
In this lecture you will learn about basic and logical operators in R.
In this video you will learn about the different types of objects in R:
Vectors (1 dimension, 1 data type)
Matrices (2 dimensions, 1 data type)
Arrays (x dimensions, 1 data type)
Data frames (2 dimensions, x data types)
Lists (1 dimension, x data types)
In this video you will learn how to use mode/typof to identify data types in a vector.
Data Types script
In this lecture you will learn how to create random numbers in three different distributions:
Normal distribution
Poison distribution
Uniform distribution
Take a few minutes to go through this exercise and see if you understood the lecture.
Presentation of the solution
In this video you will learn how to import and export csv files from/to R.
CSV (comma seperated values) is the best way to interact with Excel.
In this video you will learn:
basics about matrices
rows - columns
creating diagonal matrices
extracting a vector out of a matrix
transposing
In this video you will learn:
getting the inverse of a matrix
matrix multiplication
crossproducts
solving equation systems
summary
You can find the solution skript at the bottom of the matrices skript
Presentation of the solution
In this video you will learn about:
definition of a list
how to create a list
naming lists
elements of a list
length of lists
extracting elements out of a list
combining lists
mode of a list
Take a few minutes to go through the exercises. At the end of the video you will see the solution.
In this video you will learn:
basics about data frames
structure of data frames
creating data frames
adding vectors to data frames
attach function
handling and extracting subsets of data frames
In this video you will learn:
extracting columns, rows and specific values out of a data frame
filtering according to specific criteria and logical operations
summary
In this video you will learn how you can use factors to handle character vectors.
Take a few minutes to solve this exercises. At the end of this video I will present the solution.
In this video you will get a general idea about functions in R.
You will learn about the syntax.
In this video you will learn how you can use ... to create open ended functions.
In this video you will learn about the ifelse statement.
You will also see a summary about the functions section.
Try to solve the exercises in this video. At the end of the video you will find the solution.
In this video you will get a general introduction about loops in R. I am also discussing the If statement.
In this video you will learn about the For loop
In this video you will learn about the While loop
In this video you will learn about the repeat loop.
You will also see a brief summary about what we learned on loops in R.
Please take the time to solve the exercises I prepared for you in this video. At the end you will also find the solutions to it.
This exercise is a bit harder. Try to calculate the prime numbers by using loops.
In this video you will learn:
general introduction to the apply family
apply function
In this lecture about the apply family of funxtions you will learn:
tapply function
by function
In this video you will learn about the following functions of the apply family:
eapply
lapply
sapply
In this video you will learn about the following functions of the apply family:
vapply
replicate
mapply
In this video you will learn more about rapply and you will also get a summary of the apply functions.
Take the time to solve this exercises I prepared for you. In the next video I will present the solution.
In this video I am presenting the solutions to the apply exercises
In this section you will learn more about graphs in R.
This is a brief introduction to the graphical parameters in R.
In this video you learn how you can create boxplots:
adding means to your boxplot
adding different colours
boxplot terminology
In this video you will learn about the different ways in which you can export and store your graphs.
Take your time to solve this boxplot exercise and test your knowledge. In the next video you will find the solution.
Here you can find the solution to the boxplot exercise.
In this video you will learn how to create pie charts in R:
labelling pie charts
pie charts with data frames
3D pie charts (using plotrix)
Please note that you should download the library "plotrix" for this lesson
In this video you will learn how to create histograms in R:
modifying the bin count
labelling
modifying the axes
frequency vs density
adding curves to histograms
Try to resemble the histogram I present to you in this video. At the end you will find the solution.
In this video you will learn how you can put several datasets into one scatterplot.
You will also learn about legends.
Take a few minutes to solve this scatterplot exercise. At the end of the video you will find the solution.
Are you new to R?
Do you want to learn more about statistical programming?
Are you in a quantitative field?
You just started learning R but you struggle with all the free but unorganized material available elsewhere?
Do you want to hack the learning curve and stay ahead of your competition?
If your answer is YES to some of those points - read on!
This Tutorial is the first step - your Level 1 - to R mastery.
All the important aspects of statistical programming ranging from handling different data types to loops and functions, even graphs are covered.
While planing this course I used the Pareto 80/20 principle. I filtered for the most useful items in the R language which will give you a quick and efficient learning experience.
Learning R will help you conduct your projects. On the long run it is an invaluable skill which will enhance your career.
Your journey will start with the theoretical background of object and data types. You will then learn how to handle the most common types of objects in R. Much emphasis is put on loops in R since this is a crucial part of statistical programming. It is also shown how the apply family of functions can be used for looping.
In the graphics section you will learn how to create and tailor your graphs. As an example we will create boxplots, histograms and piecharts. Since the graphs interface is quite the same for all types of graphs, this will give you a solid foundation.
With the R Commander you will also learn about an alternative to RStudio. Especially for classic hypothesis tests the R Commander GUI can save you some time.
According to the teaching principles of R Tutorials every section is enforced with exercises for a better learning experience.
You can download the code pdf of every section to try the presented code on your own.
This tutorial is your first step to benefit from this open source software.
What R you waiting for?
Martin