Skip to main content

Course

Defensive R Programming

Intermediate4 hr

Learn defensive programming in R to make your code more robust.

R4 hr16 videos51 Exercises3,400 XP5,077Statement of accomplishment

Create Your Free Account

Continue with Google
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Training a Team?

Try for Business

Course Description

Writing R scripts is easy. Writing good R code is hard. In this course, we'll discuss defensive programming - a set of standard techniques that will help reduce bugs and aid working in teams. We examine techniques for avoiding common errors and also how to handle the inevitable error that arises in our code. The course will conclude looking at when to make the transition from script to project to package.

Prerequisites

Curriculum

Course outline

1

Avoiding Conflict

In this first chapter, you'll learn what defensive programming is, and how to use existing packages for increased efficiency. You will then learn to manage the packages loaded in your environment and the potential conflicts that may arise.
Start Chapter
4

Creating a Battle Plan

Creating a script is nice, but working on a project with several scripts and assets requires structure. This final chapter will teach you good organization practices, so you can go from script to package with an optimal workflow.
Start Chapter
R

Defensive R Programming

Course
Complete

Earn Statement of Accomplishment

Enroll Now

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.