Assigning OPerator

It will store a value in a variable

a<-2
a
## [1] 2

Function

Its a function c of numeric values

c(1,2,3)
## [1] 1 2 3
c
## function (..., recursive = FALSE)  .Primitive("c")
a<-1 + 1 # this is a comment

Function , Comment ,Install Packages

Ctrl+ALt +I is for inserting a junk Ctrl+R for executing your script

x<-c(1:20)
x
##  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
mean(x)
## [1] 10.5
>install.packages("ggplot2")
x<-c(1,2,3,4,5:10,NA)

sd(x)
## [1] NA
sd(x,na.rm= TRUE)
## [1] 3.02765
sd(x,TRUE)
## [1] 3.02765
sd(TRUE,x)
## Warning in if (na.rm) "na.or.complete" else "everything": the condition has
## length > 1 and only the first element will be used
## [1] NA
sd(na.rm=TRUE,x)
## [1] 3.02765
sd(TRUE,x=x)
## [1] 3.02765

create one 5-dimensional vector of values 4,7,3,2,5 as ‘x’ add 2 with x and assign the value to y find the mean,sd of y create another variable z as comcombination of 2,3 add x and z

x<-c(4,7,3,2,5)
x
## [1] 4 7 3 2 5
y<-x+2
y
## [1] 6 9 5 4 7
mean(y)
## [1] 6.2
sd(y)
## [1] 1.923538
z<-c(2,3)
z
## [1] 2 3
x+z
## Warning in x + z: longer object length is not a multiple of shorter object
## length
## [1]  6 10  5  5  7

```

10+2
## [1] 12