In this R Programming Tutorial, we explain everything about linear and nonlinear modeling, data analysis, and time-series analysis to a great extent. Its easy coding, wide number of packages, and Free software are making data scientists interested in this language.
R is a programming language that provides a software environment for graphics, statistical computing, data science, and machine learning, and we explain most of them in this tutorial. It also provides a wide variety of graphical techniques.
What is R Programming?
R is an interpreted programming language created by Ross Ihaka and Robert Gentleman, helpful in statistical computing, data analysis, and data visualization. Similar to any other programming language, R supports operators, conditional statements, loops, and objects (vectors, matrices, lists, arrays, etc).
R is open-source software available for various operating systems, including Windows, Mac, and Linux. It offers a wide variety of packages to perform operations on objects, including ggplot2, lattice, shiny, etc.
R Hello World Program
The Hello World program helps you understand how we can write and print a simple message as output. Here, we use the built-in print() method to display Hello World!”.
NOTE: As it is a one-line code, I wrote this print() statement in the console.
> print("Hello World!")
[1] "Hello World!"
Download and Installation of R software
Use the hyperlinks in this section to understand the steps involved in downloading R software and installing it on Windows or any other operating system. Next, download and set up RStudio to write the first program. Then install the required packages.
List of Operators
R Decision Making & Loops
Loops help execute a fixed number of lines several times. The control structures allow us to control the execution flow of a series of statements or expressions. Based on the condition or input, control structures will respond by executing the expressions.
The following R programming tutorial explains the loops and the decision-making statements with a practical example.
- If Statement
- If Else Statement
- Else If Statement
- Nested If Statement
- Switch Statement
- Break Statement
- Next Statement
- While Loop
- For Loop
- Repeat Loop
R Programming Objects
R is all about objects because this Programming always works with objects. The following list is the available objects to work with data.
Learn about Functions
The math page shows the list of available mathematical functions, such as abs, sqrt, ceiling, floor, and round.
Learn R Data Sources
R Data Visualization (Charts & Graphs)
This section of the R programming tutorial explains the graphs and charts available to visualize data.
- Bar Chart
- Stacked & Clustered Bar Chart
- Pie Chart
- Scatter Plot
- Histogram
- Boxplot
- Stem and Leaf Plot
- Mosaic Plot
Lattice Package
ggplot2 Package
The following are list of available R Programming charts in the ggplot2 package. Please use the links to see the example of each plot.
Comments are closed.