About R language

R is a programming languages, mostly used in statistical and analysis  purpose. It also provides good graphical representation, like chart can be created easily with analytical data. We are using machine learning and in Data Science computing as well. R is available as Free Software under GNU General Public License. Here is R project link - https://www.r-project.org/about.html and manual/documentation link - https://cran.r-project.org/manuals.html

R language can run on Unix as well as in Windows. You can download R from CRAN home page https://cran.r-project.org/. Both for Unix and Window. There is one great IDE for R as well, and this is from RStudio. Here you can download R Studio - https://rstudio.com/products/rstudio/

Here more about R from Wikipedia - https://en.wikipedia.org/wiki/R_(programming_language)

Also, link from public R official blog - https://developer.r-project.org/Blog/public/

R do have some great features like below which makes more flexible on statistical computing, analysis, creating graph etc.

Assign variables and statistical computing. R studio can be use to try the below.

x <- 3
y <- 2
z <- -1

## compute the solution
(-y + sqrt(y^2 - 4*x*z)) / (2*x)
(-y - sqrt(y^2 - 4*x*z)) / (2*x)

From 1 to 8(it could N)

> seq(1, 8)
[1] 1 2 3 4 5 6 7 8
> sum(seq(1, 8))
[1] 36

Logarithm
> log(10^x)
   [1]   2.302585   4.605170   6.907755   9.210340  11.512925  13.815511..............


data frame - Conceptually, we can think of a data frame as a table with rows representing observations and the different variables reported for each observation defining the columns. Data frames are particularly useful for datasets because we can combine different data types into one object.

Vectors, Factors, List, Metrics are other rich R features. We can do Vector arithmetic, Rescaling a vector, Indexing, and kind of SQL filtration like below:

(population is the data set here)

ind <- which(population$state == "California")
ind <- match(c("New York", "Florida", "Texas"), population$state)
c("Boston", "Dakota", "Washington") %in% population$state


Graph & Plot: Nice feature, simple code/command and get the things done for you.

x <- snatching$population / 10^6
y <- snatching$total
plot(x, y)


x <- with(snatching, total / population * 100000)
hist(x)

murders$rate <- with(murders, total / population * 100000)
boxplot(rate~region, data = murders)

x <- matrix(1:120, 12, 10)

image(x)


Happy learning R!

Comments

Popular posts from this blog

How to fix Azure DevOps error MSB4126

How to create Custom Visuals in Power BI – Initial few Steps

SharePoint Admin Center