## R-language used in data science.

People have helped me right this blogs. Similarly ideas came from the students and teachers of introduction to data science with R.data scientist who knows how to program and computers give you scientific superpower. It can do all of these things quickly and error free.R gives youlanguage to speak in. It gives you always to talk to your computer and free. You can save data into an object like P or Q .whenever R counters the object it will replace it with the data saved inside. You can name and object in R almost anything you want but there are few rules. First name cannot start with a number.second on name cannot use some special symbols like ^,€,* ,$,!,+,-@...R-datascience |

### R-uses element-wise exclusion.

When we use two or more vectors in operations, R will line up the vectors and perform a sequence of individual operations.

library("ggplot2", lib.loc="~/R/win-library/3.6")

> x <- c(-1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1)

>

> x

[1] -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

> y=x^3

> y

[1] -1.000 -0.512 -0.216 -0.064 -0.008 0.000 0.008 0.064

[9] 0.216 0.512 1.000

> qplot(x,y)

> qplot(y,x)

> qplot(x, binwidth = 1)

> qplot(y, binwidth = 1)

>

> roll <- function() {

+ die <- 1:6

+ dice <- sample(die, size = 2, replace = TRUE,

+ prob = c(1/8, 1/8, 1/8, 1/8, 1/8, 3/8))

+ sum(dice)

+ }

>

> rolls <- replicate(10000, roll())

>

> qplot(rolls, binwidth = 1)

conclusion

R is free to learn from online.

library("ggplot2", lib.loc="~/R/win-library/3.6")

> x <- c(-1, -0.8, -0.6, -0.4, -0.2, 0, 0.2, 0.4, 0.6, 0.8, 1)

>

> x

[1] -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0

> y=x^3

> y

[1] -1.000 -0.512 -0.216 -0.064 -0.008 0.000 0.008 0.064

[9] 0.216 0.512 1.000

> qplot(x,y)

> qplot(y,x)

> qplot(x, binwidth = 1)

> qplot(y, binwidth = 1)

>

> roll <- function() {

+ die <- 1:6

+ dice <- sample(die, size = 2, replace = TRUE,

+ prob = c(1/8, 1/8, 1/8, 1/8, 1/8, 3/8))

+ sum(dice)

+ }

>

> rolls <- replicate(10000, roll())

>

> qplot(rolls, binwidth = 1)

conclusion

R is free to learn from online.

## 0 Comments