What is R
R has a large number of fans not just in the Data Science and IT communities, but also in every discipline and sphere of the world. This is due to the fact that data is now used in almost every sector, and R has a twin benefit in that it is both a programming language and a statistical computing with graphics environment.
R was created by statisticians for the purpose of statistical analysis, and it is still the computer language of choice for most professionals who used to do statistical analysis. With only a few lines of code, R makes it simple to design complicated statistical models. R offers an incredible ecosystem of packages which makes our analysis very easy. These packages are strong, simple to use, and come with excellent documentation.
The following are the reasons why people chose R for data analysis.

    1. R is open source (Available free)

R is an open-source programming language, which means it’s completely free to use. We can install it on your PC for free which was released under the GNU (General Public License).

    1. R is compatible with any operating system (windows, mac, …)
    2. R has an extensive library for use.

R comes with a large library of built-in packages and functions to meet a variety of applications. Machine Learning, Statistical Modeling, Data Manipulation, Data Visualization, and Imputation are just a few of the unique packages available.

    1. Furthermore, because R is open-source, we can create our own package and contribute to the R community.
    2. R is extensively good for data visualization

R has some excellent packages for creating detailed visualizations like ggplot2, lattice, leaflet, plotly, and RGL, to name a few. With these packages, we can design high-quality graphs.

After all, R is one of the most versatile and efficient statistical tools, and it has growing its popularity and is used widely in different disciplines because it is capable of meeting any and all of the user’s requirements.

some R codes


R codes for Mode

correlation in Table

Ratio Estimation code Ratio estimation code


fcm <- function(cormat, pmat) {
ut <- upper.tri(cormat)
row = rownames(cormat)[row(cormat)[ut]],
column = rownames(cormat)[col(cormat)[ut]],
cor =(cormat)[ut],
p = pmat[ut]

keeping 4 graphics in one


plot11<-ggplot(kidney, aes(x=Age))+ geom_histogram(fill=”red”, color=”black”, binwidth = 10)
plot12<-ggplot(kidney, aes(Age,Height))+
geom_violin(col=”blue”, fill=”green”)+ ggtitle(“violine plot”)
plot13<-ggplot(data=kidney, aes( Height))+
geom_boxplot(color=”dark red”, fill=”light green”, alpha=0.5)
plot14<-ggplot(kidney, aes(x=Age))+ geom_density(fill=”blue”,alpha=0.5)
grid.arrange(plot11,plot12,plot13,plot14, ncol=2, nrow=2)

R dataset

Correlation Regression

Correlation Regression

Notes on R