HomeRIntermediate R

# Intermediate R

4.5+
114 reviews
Beginner

Continue your journey to becoming an R ninja by learning about conditional statements, loops, and vector functions.

6 Hours14 Videos81 Exercises

or

Training 2 or more people?Try DataCamp For Business

## Course Description

Intermediate R is the next stop on your journey in mastering the R programming language. In this R training, you will learn about conditional statements, loops, and functions to power your own R scripts. Next, make your R code more efficient and readable using the apply functions. Finally, the utilities chapter gets you up to speed with regular expressions in R, data structure manipulations, and times and dates. This course will allow you to take the next step in advancing your overall knowledge and capabilities while programming in R.

### .css-1goj2uy{margin-right:8px;}Group.css-gnv7tt{font-size:20px;font-weight:700;white-space:nowrap;}.css-12nwtlk{box-sizing:border-box;margin:0;min-width:0;color:#05192D;font-size:16px;line-height:1.5;font-size:20px;font-weight:700;white-space:nowrap;}Training 2 or more people?

Try DataCamp for BusinessFor a bespoke solution book a demo.

### In the following Tracks

Certification Available

Go To Track

Go To Track
1. 1

### Conditionals and Control Flow

Free

In this chapter, you'll learn about relational operators for comparing R objects, and logical operators like "and" and "or" for combining TRUE and FALSE values. Then, you'll use this knowledge to build conditional statements.

Play Chapter Now
Relational Operators
50 xp
Equality
100 xp
Greater and less than
100 xp
Compare vectors
100 xp
Compare matrices
100 xp
Logical Operators
50 xp
& and |
100 xp
& and | (2)
100 xp
Reverse the result: !
50 xp
Blend it all together
100 xp
Conditional Statements
50 xp
The if statement
100 xp
100 xp
Customize further: else if
100 xp
Else if 2.0
50 xp
Take control!
100 xp
2. 2

### Loops

Loops can come in handy on numerous occasions. While loops are like repeated if statements, the for loop is designed to iterate over all elements in a sequence. Learn about them in this chapter.

3. 3

### Functions

Functions are an extremely important concept in almost every programming language, and R is no different. Learn what functions are and how to use them—then take charge by writing your own functions.

4. 4

### The apply family

Whenever you're using a for loop, you may want to revise your code to see whether you can use the lapply function instead. Learn all about this intuitive way of applying a function over a list or a vector, and how to use its variants, sapply and vapply.

5. 5

### Utilities

Mastering R programming is not only about understanding its programming concepts. Having a solid understanding of a wide range of R functions is also important. This chapter introduces you to many useful functions for data structure manipulation, regular expressions, and working with times and dates.

### In the following Tracks

Certification Available

Go To Track

#### R Programming Fundamentals

Go To Track

Prerequisites

Introduction to R
Filip Schouwenaars

Data Science Instructor at DataCamp

Filip is the passionate developer behind several of DataCamp's most popular Python, SQL, and R courses. Currently, Filip leads the development of DataCamp Workspace, a collaborative data science notebook. Under the motto 'Eat your own dog food', he uses Workspace to understand how users learn on and interact with DataCamp. Filip holds degrees in Electrical Engineering and Artificial Intelligence.
See More

## Don’t just take our word for it

*4.5
from 114 reviews
65%
25%
8%
0%
2%
Sort by
• Augusto P.
19 days

I couldn't tell because so far it's all theory and no real-life excercises. I mean, an actual project I can share afterwards

• Wagner S.
2 months

The examples were very well explained, and the practice was essential.

• Ernest B.
3 months

the instructor presented valuable information at a steady, productive pace.

• S B.
6 months

This course was well designed and progressed me through an otherwise daunting programme. I look forward applying what I have learnt.

• Emmanuel E.
6 months

It’s a great way to start learning R Love the guides and examples . Can’t wait to start the advanced course

"I couldn't tell because so far it's all theory and no real-life excercises. I mean, an actual project I can share afterwards"

Augusto P.

"The examples were very well explained, and the practice was essential."

Wagner S.

"the instructor presented valuable information at a steady, productive pace."

Ernest B.