This comprehensive collection covers everything from the foundational basics to advanced techniques related to R Programming language. R is a language and environment for statistical computing and graphics. R provides a wide variety of statistical (linear and nonlinear modeling, classical statistical tests, time-series analysis, classification, clustering, …) and graphical techniques and is highly extensible.
Creating your first R program
- You can run an R program in many ways:
i) R environment directly in windows/Linux.
ii) Google Colab ( Change the language from Python to R in the runtime type under the Runtime tab)
iii) Other online platforms include onlinegdb, programiz, etc.
- Write your Hello World program
print("hello world")
- Save it as an extension .R ( test.R)
- Run it using the below Rscript test.R
Rscript test.R
- Hello world
- Comment
- Variable Assign
- Constants
- Datatypes
- Array
- Matrix
- Relational Operator
- Arithematic Operator
- Logical Operator
- Vector
- List
- Factor
- Strings
- Substring
- Change Case
- String concat (paste)
- nchar
- Sequence
- Sequence Repeat
- Dataframe
- if
- if else
- if elseif
- for
- while
- Repeat loop
- In built Function
- User Defined Function
- Data Analysis