R Programming For Absolute Beginners
4.4 (1,930 ratings)
59,168 students enrolled

# R Programming For Absolute Beginners

Learn the basics of writing code in R - your first step to become a data scientist
4.4 (1,930 ratings)
59,168 students enrolled
Created by Bogdan Anastasiei
Last updated 6/2017
English
English [Auto]
Current price: \$27.99 Original price: \$39.99 Discount: 30% off
23 hours left at this price!
30-Day Money-Back Guarantee
This course includes
• 9.5 hours on-demand video
• 12 articles
• Access on mobile and TV
• Certificate of Completion
Training 5 or more people?

What you'll learn
• Work with vectors, matrices and lists
• Work with factors
• Manage data frames
• Write complex programming structures (loops and conditional statements)
• Build their own functions and binary operations
• Work with strings
• Create charts in base R
Course content
Expand all 119 lectures 09:32:57
+ Introduction
1 lecture 04:22

What we are going to cover in this course.

Preview 04:22
+ Getting Started with R
6 lectures 39:20

Preview 05:44

The RStudio work interface, explained in detail.

The RStudio Interface
12:58

How to work with packages in R - you will need that.

Installing and Activating R Packages
04:44

How to setup the working directory in R, so you can access the files in that directory.

Setting the Working Directory
02:14

How to perform the basic mathematical operations in R.

Basic Operations in R
03:17

The basic stuff about variables in R.

Working With Variables
10:23
+ Vectors
22 lectures 01:44:18

How to use the c() function - one of the most common ways to create vectors.

Creating Vectors With the c() Function
05:57

Build sequences of integers with the colon operator.

Creating Vectors Using the Colon Operator
04:03

Create vectors of replicated values with the rep() function.

Creating Vectors With the rep() Function
04:30

Create sequences of real numbers with the seq() function.

Creating Vectors With the seq() Function
07:42

Build vectors of discrete and continuous random numbers.

Creating Vectors of Random Numbers
08:05

Create vectors with no elements.

Creating Empty Vectors
03:13

How to access vector components using numeric indices.

Indexing Vectors With Numeric Indices
09:44

How to access vector components using logical indices.

Indexing Vectors With Logical Indices
01:33

How to name vector components - and remove names when you don't need them.

Naming Vector Components
01:51

How to access the vector components using various criteria.

Filtering Vectors
08:11

Use these two function to check whether the vector components meet your conditions.

The Functions all() and any()
06:24

Besides sum and product, you will learn how to compute basic statistical indicators for a numeric vector.

Sum and Product of Vector Components
02:56

One of the most important topics in R: how to apply mathematical operations to all the components in a vector.

Vectorized Operations
07:13

How to deal with unknown values in a vector.

Treating Missing Values in Vectors
03:24

How to order vector components.

Sorting Vectors
03:35

How to get the minimum and maximum values in vectors and pairs of vectors.

Minimum and Maximum Values
02:10

A great way to use the if-then-else statement on a vector.

The ifelse() Function
07:00

Useful operations with vectors  - and something about recycling vectors.

03:09

How to check whether two vectors have equal components or not.

Testing Vector Equality
09:16

Compute the Pearson correlation for two numeric vectors.

Vector Correlation
04:11

How to perform statistical analyses in R like an expert.

Bonus Lecture: Learn Statistics with R
00:05

Practical exercises for the section "Vectors".

Practical Exercises
00:05
+ Matrices and Arrays
16 lectures 01:21:57

The most used way to create matrices - the matrix() function.

Creating Matrices With the matrix() Function
07:42

Other two useful functions for creating matrices.

Creating Matrices With the rbind() and cbind() Functions
03:26

How to name rows and columns in a matrix.

Naming Matrix Rows and Columns
02:32

How to access matrix elements.

Indexing Matrices
10:14

How to find the elements that meet one or several conditions.

Filtering Matrices
04:37

How to change any data value in a matrix.

Editing Values in Matrices
03:17

How to add new rows or columns, and how to remove rows and columns.

Adding and Deleting Rows and Columns
07:46

Find the minimum and maximum values in a matrix.

Minima and Maxima in Matrices
04:34

Using the apply() function to perform mathematical operations on the matrix rows and columns.

Applying Functions to Matrices (1)
03:27

Some more important stuff about the apply() function.

Applying Functions to Matrices (2)
10:25

Apply the swipe() function to matrices.

Applying Functions to Matrices (3)
04:08

How to add and multiply two matrices (when these operations are possible).

03:08

How to compute the determinant and the inverse of a quadratic matrix - and a couple more operations.

Other Matrix Operations
04:52

How to build an array with two (or more) matrices.

Creating Multidimensional Arrays
06:31

How to access any element (or group of elements) in an array.

Indexing Multidimensional Arrays
05:12

Practical exercises for the section "Matrices and Arrays".

Practical Exercises
00:06
+ Lists
10 lectures 43:00

What is a list and how to use the list() function to create one.

Create Lists With the list() Function
07:30

Other way to create a list - the vector() function.

Create Lists With the vector() Function
02:00

How to access list elements.

Indexing Lists With Brackets
06:32

Other possible way to access list elements.

Indexing Lists Using Objects Names
03:49

How to modify values (or entire objects) in a list.

Editing Values in Lists
02:48

How to add objects to a list, or remove existing objects.

03:32

When and how you can use the lapply() function on a list.

Applying Functions to Lists
09:30

Use what you know about lists to "read" the results of a linear regression analysis.

Practical Example of List: the Regression Analysis Output
07:08

Learn to perform simple and advanced data analyses in R.

Bonus Lecture: Data Analysis in R
00:05

Practical exercises for the section "Lists".

Practical Exercises
00:05
+ Factors
5 lectures 22:42

How to create unordered and ordered factors.

Working With Factors
12:50

How to split a vector in several objects using the levels of a factor.

Splitting a Vector By a Factor Levels
03:41

How to compute summary values for a vector components by a factor level with the tapply() function.

The tapply() Function
03:03

How to compute summary values for a vector components by a factor level, this time using the by() function.

The by() Function
03:03

Practical exercises for the section "Factors".

Practical Exercises
00:05
+ Data Frames
15 lectures 01:10:51

How to create data frames using the data.frame() function.

Creating Data Frames
06:00

How to read data frames from the files on your hard disk (CSV or text format).

06:56

How to save a data frame on your hard disk as a CSV file.

.
Writing Data Frames in External Files
03:40

The first way to index a data frame.

Indexing Data Frames As Lists
04:34

The second way to index a data frame.

Indexing Data Frames As Matrices
06:50

How to draw a random sample of observation form any data frame.

Selecting a Random Sample of Entries
04:04

Find the rows in a data frame that meet certain criteria.

Filtering Data Frames
05:56

Modify values in data frames.

Editing Values in Data Frames
03:20

Adding new observations and variables to an existing data frame.

Adding Rows and Columns to Data Frames
06:14

Naming (and renaming) observations and variables in a data frame.

Naming Rows and Columns in Data Frames
02:47

Using the functions apply(), lapply() and sapply() with data frames.

Applying Functions to Data Frames
05:28

Arrange the data frame entries in any order you want.

Sorting Data Frames
06:49

Arrange the data frame entries in a random order.

Shuffling Data Frames
02:02

Join two data frames based on a common variable.

Merging Data Frames
06:06

Practical exercises for the section "Data Frames".

Practical Exercises
00:05
+ Programming Structures
14 lectures 01:12:11

Use the for loops to go through a sequence and perform various operations.

For Loops
11:29

Learn how to work with a while loop.

While Loops
05:59

Learn how to use a repeat loop.

Repeat Loops
03:00

Get more serious - build a few nested for loops.

Nested For Loops
06:52

Using if-else statements in R.

Conditional Statements
07:51

More complex if-else statements.

Nested Conditional Statements
02:24

Combining for loops and conditional statements to perform really useful tasks.

Loops and Conditional Statements
04:09

Create custom functions that you can reuse later.

User Defined Functions
07:47

Why is the return command useful often times.

The Return Command
04:40

Using nested loops and conditional statements in a function.

More Complex Functions Examples
05:04

A function that checks whether a positive whole number is a perfect square or not.

Checking Whether an Integer Is a Perfect Square
03:29

A function that solves any quadratic equation.

A Custom Function That Solves Quadratic Equations
04:11

How to create custom binary operations using functions.

Binary Operations
05:10

Practical exercises for the section "Programming Structures".

Practical Exercises
00:06
+ Working With Strings
10 lectures 01:10:23

Various ways to create string variables.

Creating Strings
07:14

Useful functions to print and format string variables.

Printing Strings
11:31

A few functions used to concatenate string variables (and vectors).

Concatenating Strings
08:21

How to change characters in a string.

String Manipulation (1)
03:51

How to extract a substring from a string (and replace it, if necessary).

String Manipulation (2)
06:42

How to split strings based on a substring.

String Manipulation (3)
02:13

How to find any sequence of characters in a given string.

Functions for Finding Patterns in Strings
11:35

How to replace any sequence of characters in a given string.

Functions for Replacing Patterns in Strings
02:21

Use regular expression to define patterns.

Regular Expressions
16:30

Practical exercises for the section "Working With Strings".

Practical Exercises
00:05
+ Plotting in Base R
19 lectures 01:03:49

How to create a simple dot chart.

Building Scatterplot Charts
03:21

How to set some parameters to make your dot chart more good looking.

Setting Graphical Parameters (1)
07:50

Set a few more parameters in your dot chart.

Setting Graphical Parameters (2)
06:44

Find the trend in your dot chart and build a trend line.

Adding a Trend Line to a Scatterplot
01:32

Create a grouped dot chart.

Building a Clustered Scatterplot
06:30

Create a line chart with some made-up data.

Plotting a Line Chart
01:54

Make your line chart a bit more interesting.

Setting the Line Parameters
04:12

Make chart with both lines and dots.

Overplotting Lines and Dots
02:40

Represent two lines in the same graph.

Plotting Two Lines in the Same Chart
03:11

How to create bar charts in R.

Plotting Bar Charts
02:35

A few parameters you can manipulate in your bar chart.

Setting the Bar Parameters
02:04

Creating and editing histogram charts.

Plotting Histograms
03:07

Creating and editing density line charts.

Plotting Density Lines
02:38

Creating and editing pie charts.

Plotting Pie Charts
04:58

How to draw boxplot charts.

Plotting Boxplot Charts
03:53

How to plot any function of one variable.

Plotting Functions
02:14

How to save charts on your hard disk.

Exporting Charts
04:13

How to draw complex charts in R.

00:08
Practical Exercises
00:05
Requirements
• No special prerequisite - you should only know how to use a computer
Description

If you have decided to learn R as your data science programming language, you have made an excellent decision!

R is the most widely used tool for statistical programming. It is powerful, versatile and easy to use. It is the first choice for thousands of data analysts working in both companies and academia. This course will help you master the basics of R in a short time, as a first step to become a skilled R data scientist.

The course is meant for absolute beginners, so you don’t have to know anything about R before starting. (You don’t even have to have the R program on your computer; I will show you how to install it.) But after graduating this course you will have the most important R programming skills – and you will be able to further develop these skills, by practicing, starting from what you will have learned in the course.

This course contains about 100 video lectures in nine sections.

In the first section of this course you will get started with R: you will install the program (in case you didn’t do it already), you will familiarize with the working interface in R Studio and you will learn some basic technical stuff like installing and activating packages or setting the working directory. Moreover, you will learn how to perform simple operations in R and how to work with variables.

The next five sections will be dedicated to the five types of data structures in R: vectors, matrices, lists, factors and data frames. So you’ll learn how to manipulate data structures: how to index them, how to edit data, how to filter data according to various criteria, how to create and modify objects (or variables), how to apply functions to data and much more. These are very important topics, because R is a software for statistical computing and most of the R programming is about manipulating data. So before getting to more advanced statistical analyses in R you must know the basic techniques of data handling.

After finishing with the data structures we’ll get to the programming structures in R. In this section you’ll learn about loops, conditional statements and functions. You’ll learn how to combine loops and conditional statements to perform complex tasks, and how to create custom functions that you can save and reuse later. We will also study some practical examples of functions.

The next section is about working with strings. Here we will cover the most useful functions that allow us to manipulate strings. So you will learn how to format strings for printing, how to concatenate strings, how to extract substrings from a given string and especially how to create regular expressions that identify patterns in strings.

In the following section you’ll learn how to build charts in R. We are going to cover seven types of charts: dot chart (scatterplot), line chart, bar chart, pie chart, histogram, density line and boxplot. Moreover, you will learn how to plot a function of one variable and how to export the charts you create.

Every command and function is visually explained: you can see the output live. At the end of each section you will find a PDF file with practical exercises that allow you to apply and strengthen your knowledge.

So if you want to learn R from scratch, you need this course. Enroll right now and begin a fantastic R programming journey!

Who this course is for:
• Wannabe data scientists