R Tutorial

We present you the R Tutorial, to learn R language, where we cover the basics of R programming, loading data into R object from different data sources, creating charts and graphs, extracting statistical information, and more.

What is R programming language ?

R is an open source programming language. In recent times, it has become one of the most common choice for statistical analysis.

Features of R

  • Open Source and Free to use.
  • Works well for statistics.
  • Command-Line Programming Language – But IDEs like R Studio and plugins to the popular IDEs like Eclipse, etc., are available.
  • Easy sharing of Results or Analysis.
  • Integration with other packages and programming languages.
  • R programming is easy and informative.

R Tutorial Index

R Tutorial - Learn R programming language

In our R Tutorial, we shall take you through the following topics.

Get Started with R

The following tutorials help you get started with R programming in your PC or Mac.

R Variables and Datatypes

Variables deal with how data is stored during program execution and the Datatypes deal with the characteristics of these variables.

R Operators

R Arithmetic Operators, R Relational Operators, R Logical Operators, R Assignment Operators, R Miscellaneous Operators with example R scripts.

R Decision Making

Decision Making statements are those which execute a block of code based on the result of a condition. Decision making statements are also called Condition Statements.

In the following R Tutorials, we first go through the available decision making statements in R language: if, if-else, if-else-if and switch; and then go through each of these statements, discuss their syntax and go through examples to understand their usage.

If Statement with Logical Operators in Condition

R Looping

Looping statements are used to execute a block of code repeatedly in a loop, based on a condition, or for every element in a collection.

The following R Tutorials start with different looping statements in R language; and continue with each looping statement in detail with examples.

R Functions

A function is a set of statements, that can take some arguments, transform them or perform a specific task. R has a large number of in-built functions that cover statistics, basic mathematics, graphs/charts, etc. We can also create our own functions.

R Strings

String is a sequence of characters.

In the following R Tutorials, we first have a good look into Strings in R programming, and then go through different String Operations with examples.

R Data Frames

R Data Frames are tightly coupled collections of variables. Data Frames share many of the properties of matrices and of lists. In most of the R language’s modeling software, Data Frames are used as the fundamental data structure.

The following list of R Tutorials help us get started with Data Frames in R, and most used operations or transformation done on Data Frames.

R Type Conversion

R allows us to convert a value from one datatype to other.

The following R Tutorials go through different scenarios of converting value of a datatype into value of another datatype.

R Vectors

R Vector is a sequence of elements of same datatype.

The following tutorials give us an introduction to Vectors in R, take us through different type of vectors, basic CRUD operations on a vector, vector conversion, etc.

R Lists

R List is a sequence of elements. The elements could be of different datatypes.

The following tutorials discuss about basic CRUD operations on a List, accessing properties of a List, different transformations on a List, etc.

R Matrix

The following tutorials cover the basic CRUD operations of a Matrix, mathematic operations like addition, subtraction, multiplication, matrix operations like finding Inverse, Transpose, etc.

R Date & Time

Data Interfacing from different sources of data to R language

The following tutorials deal with reading different file types and loading data from those files into R data objects, and how to write data from R objects to files.

Charts, Plots & Graphs – R Tutorial

The following R Tutorials take us through different plots that we can draw in R language, and how to tweak them with the help of examples.

R plot()

R barplot()

Statistical Analysis

The following list presents different R Tutorials to perform statistical analysis on R objects like Vector, List, Data Frame, Matrix, etc.

R Mathematical Functions

R has builtin functions that implement Mathematical functions like finding absolute value, finding maximum value of a collection, finding minimum value of a collection, finding square root of a number, etc. The following tutorials help us through these Mathematical functions with examples.


You may refer following reference for official R documentation.

  • https://www.rdocumentation.org/


With this R Tutorial, we have learnt the basics of R, how to interface data to R from different sources, create charts and graphs, and extract statistical information.