R is one of the best programming languages that are specifically designed for statistics and graphics. Programming in R is a fast and effective way to perform advanced data analyses and manipulations. In this course you will learn how to use R and utilize the many data analysis techniques, methods, and functions it has to offer to the professional data scientist.

preview the course

for FREE!

Create a free account and start learning data science today.

create free accountIn this introductory part of the course, we will go for a walk in the R environment. First, we are going to install R and RStudio together. Then, we’ll dive straight into RStudio and learn about its interface, and how to make use of the main windows and tabs there. We will also talk about setting your working directory and getting additional help.

FREE Intro

FREE Downloading and installing R & RStudio

FREE Quick guide to the RStudio user interface

FREE Changing the appearance in RStudio

FREE Installing packages and using the library

In this section you will learn about objects and coercion rules in R, functions in R, how to use R’s console. Not only that, by the end of the section you will have built your first very own function; it will be able to draw cards from a deck, so you can play your favourite board game even if you don’t have the physical cards in front of you.

FREE Creating an object in R

FREE Data types in R - Integers and doubles

FREE Data types in R - Characters and logicals

FREE Coercion rules in R

FREE Functions in R

FREE Functions and arguments

FREE Building a function in R

FREE Using the script vs. using the console

Now that we have covered the basics, in this section we are about to drill deeper into R’s most widely used object type – the vector. You will learn how to create vectors and how to perform vector arithmetic operations. You will also see how to index and access elements from a vector, and how vectors recycle. Then, you will see how to change the dimensions of a vector and create a two-dimensional object from it. That will be our nice little segue into matrices.

Intro

Introduction to vectors

Vector recycling

Naming a vector

Getting help with R

Slicing and indexing a vector

Changing the dimensions of an object in R

In this section, you will learn how to create and rename matrices, and how to index and slice matrices. All of this will lay a super solid foundation for the big star of data analysis: the data frame. Not only that, but we will also talk about factors, which is related to the statistics part of the course. Finally, we will cover lists: R’s way of storing hierarchical data.

Creating a matrix

Faster code: creating a matrix in a single line of code

Do matrices recycle?

Indexing an element from a matrix

Slicing a matrix

Matrix arithmetic

Matrix operations

Categorical data

Show all lessons

Creating a factor in R

Lists in R

Show fewer lessons

In this section of the course, we will go through some of the fundamental tools you need to learn when programming with R (and many other programming languages). We will cover relational operators, logical operators, vectors, IF, ELSE, and different types of loops (for, while, and repeat) in R. Some of these topics will have already been introduced to you in our Python training, but here you will have the chance to reinforce what you have learned and see things with R in mind.

Relational Operators in R

Logical Operators in R

Logical Operators and Vectors

If, Else, Else-If Statements

If, Else, Else-If Keep-In-Minds

For Loops in R

While Loops in R

Repeat Loops in R

Show all lessons

Building a Function in R 2.0

Scoping in R | Building a Function in R 2.0 (Ctnd)

Show fewer lessons

In this section, we will focus our attention on how to create and import data frames into R. How to quickly get a sense of your data frame by using the str() function, summary(), col-and row-names, and so on. We’ll learn about accessing individual elements of your data frame for further use. And about extending a data frame with either new observations or variables (or row and columns). Furthermore, we will talk about dealing with missing data because in real life that happens more often than we’d like. And we’ll discuss exporting data frames once we’re happy with their general state and ready to share them with the world.

Creating a data frame

The Tidyverse package

Data import in R

Importing a CSV in R

Data export in R

Getting a sense of your data frame

Indexing and slicing a data frame in R

Extending a data frame in R

Show all lessons

Dealing with missing data

Show fewer lessons

Here, we will be talking about data transformation with the dplyr package. More specifically, how to filter(), arrange(), mutate(), and transmute() your data; as well as how to sample() fractions and fixed number of elements from it. You will also learn what tidy data is, why it is extremely important for the efficiency of your work to tidy your data sets in the most meaningful way, and how to achieve this by using the tidyr package. You will be tidying several messy real-life data sets, and... you will learn how to combine multiple operations in an intuitive way by using the pipe operator.

Intro

Data transformation with R - the Dplyr package - Part I

Data transformation with R - the Dplyr package - Part II

Sampling data with the Dplyr package

Using the pipe operator

Tidying your data - gather() and separate()

Tidying your data - unite() and spread()

Plotting and graphing data is the most elegant way to understand your data and present your findings to others. In this section we are going to learn about the grammar of graphics and the seven layers that comprise a visualization. Then, we will jump straight into creating graphs and plots, with the ggplot2 package. Starting with the histogram, we will continue on to the bar chart, then onto the box and whiskers plot, and finally, the scatterplot. You will notice that with each new type of plot you will also be learning about a new layer or two, getting familiarized with ggplot2 and its inner workings in an incremental way.

Intro

Intro to data visualization

Intro to ggplot2

Variables: revisited

Building a histogram with ggplot2

Building a bar chart with ggplot2

Building a box and whiskers plot with ggplot2

Building a scatterplot with ggplot2

In this part of the course, we start applying R for statistical analysis. We are ready to discuss several exploratory data analysis topics: population vs. sample; mean, median, and mode; skewness; variance, standard deviation, and the coefficient of variability, and covariance and correlation.

Population vs. sample

Mean, median, mode

Skewness

Variance, standard deviation, and coefficient of variability

Covariance and correlation

At this point, you are already familiar with hypothesis testing. We covered it in one of our earlier modules – Statistics. What we will do here is a natural continuation – you will learn how to carry out hypothesis testing in R.

Distributions

Standard Error and Confidence Intervals

Hypothesis Testing

Type I and Type II Errors

Test for the Mean. Population Variance Known

The P Value

Test for the Mean. Population Variance Unknown

Comparing Two Means. Dependent Samples

Show all lessons

Comparing Two Means. Independent Samples

Show fewer lessons

Regression analysis is another topic we covered earlier in our program. As with hypothesis testing, this is a great opportunity to apply the theory you have learned previously in R.

The Linear Regression Model

Correlation vs. Regression

Geometrical Representation

Doing the Regression in R

How to Interpret the Regression Table

Decomposition of Variability

R-Squared

MODULE 2

This course is part of Module 2 of the 365 Data Science Program. The complete training consists of four modules, each building up on your knowledge from the previous one. In contrast to the introductory nature of Module 1, Module 2 is designed to tackle all aspects of programming for data science. You will learn how to work with relational databases and SQL, as well as how to code in Python and R. By the end of this Module you will have a versatile programming skillset.

See All ModulesReal-life project and data. Solve them on your own computer as you would in the office.

Our expert instructors are happy to help. Post a question and get a personal answer by one of our instructors.

Earn a verifiable certificate after each completed course. Celebrate your successes and share your progress with your professional network!

Sign up today for FREE!

Whether you want to scale your career or transition into a new field, data science is the number one skillset employers look for. Grow your analytics expertise and get hired as a data scientist!