In R programming language it has 6 different types of data objects that are

1. Lists

2. Vectors

3. Arrays

4. Matrices

5. Tables

5. Data frames

"**#**" is used for the comment and the compiler does not process it.

" **""** " Quotes are for mentioning the string in R.

" **\**" Backslash is used to ignore come characters in R programming

- Open source: R programming language is open source so it is free to use and widely used.
- Extensive packages: There are a lot of built-in functions available in R packages so we have to use it without much effort.
- Statistical and graphical properties: R programming is used widely because of its graphing properties.

**Memory and performance**: R is not much competition when compared with python in the case of memory and performance.**Security**: In the case of security R programming is not much worthy.

1. MICE

2. Missfores

3. Mi

4. Hmisc

5. Amelia

6. ImputeR

We can use the csv file using the read.csv function in R. It creates a data frame on reading.

**Getwd()** command helps to get the name of the current directory in R programming.

We use the next statement if we want to skip an iteration in any loop in R.

There are many functions we can use in R programming some of the built in functions include

abs(x)

sqrt(x)

floor(x)

trunc(x)

log(x)

Etc

**glm()** in R programming for logistic regression.

In R programming there are 3 methods to call the function which will be

- Call by the name of the arguments
- Call by the position of the arguments
- Call by the default arguments

install.packages("package Name")

In the case of the data analysis, python doesn't have the inbuilt data analysis functionalities but in the case of the R programming, it has the inbuilt functionalities for the data analysis.

If we need the functionalities in python we have to install some packages like panda etc.

There are many companies and websites that are using R programming now and many are turning to R programming, some of them are

- NDAA

- R hadoop
- RHIPE
- ORCH
- Hadoop streaming

hist() function is used to make a histogram in R programming.

rm() function is used to remove a vector in r programming.

In R programming we have a package called “XML” to read the XML file.

This command or a single line code generates random numbers between 0 and 5.

The t-test() function in R programming is used to find if the mean of two groups is the same or not.

`lapply`

, where the `sapply`

will show the output as a data frame or a vector.

`aggregate()`

function is used to aggregate the data.

**doBy **package in R programming is used to define a table using the model formula and the function.

If we want to create a frequency table in R programming, we can use the function `table()`

.

split.string <- strsplit(x, " ")

extract.words <- split.string[[1]]

result <- unique(tolower(extract.words))

print(result)

`unlist()`

command in R programming converts a list into a vector.

x <- pbinom(26,51,0.5)

print(x)

We can use the function data.frame() for converting the data in JSON to a data frame.

In R programming we can call every matrix as an array but we aren't able to say every array is a matrix.

Matrix is two-dimensional and in the case of an array, it may be any dimension.

`fitdistr()`

function is defined in the MASS package which is used to get max likelihood fitting of a univariate distribution.

The anova() function in R programming is used in comparing the models that are nested.

cv.lm() function is used for validating the k-fold in R. It is defined in the DAAg package.

stepAIC() function is for the stepwise model selection which is defined in the MASS package.

`qda()`

function is for displaying the quadratic discriminant in R language.

`lda()`

in R to display that discriminant functions.

`auto.arima()`

function handles both.

`principal()`

function.

We have a command like “?NA” for finding the help page on missing values.

We can use a single line of code to calculate the mean in R language “ sd(n, na.rm=TRUE)

We have the command “col.max(x)” in R

Use the command “data(package = "package_name")”

We have the command “data(package = .packages(all.available = TRUE))”

`pairs( formula, data)`

Where the formula is the variables that are in a series of pairs and the data is the dataset where we took the variables.

`is.matrix(object)`

will return TRUE then it will be a matrix data object.

`t()`

for finding the transpose of any matrix. Here we have to add the matrix name in the braces.

SEM in R programming indicates Structural Equation Modeling.

CFA in R programming indicates Confirmatory Factor Analysis.

- Plotly
- Ggplot2
- Tidyquant
- Geofacet
- Shiny
- googleVis

In R programming we can write comments anywhere in the code but start with a preface “#”.

We can create a table in R language using

`myTable = data.frame()`

edit(myTable)

- Bubble sort
- Selection sort
- Merge sort
- Quick sort
- Bucket sort

We can create a variable in R programming using the assignment operator ‘ <- ’.

We have different methods to export data using the r programming, some of them are

- Sas
- Spss
- Stata
- Excel

- Excel xlsReadWrite package
- Foreign package

We are using “NaN” for representing the impossible values in R programming.

For saving an object into a file in R programing we are using the command “ save() “.

Function `order() `

is used for sorting in R language.