Assigning operator

it will store a value in variable

a<-2
a
## [1] 2

rmarkdown cheatsheet

functions=>

function combine values into vector.

c(123)
## [1] 123
 x <-c("karam", "ram","anu")

class(x)gives type of x. ##coments=>

a<-1#comment

install packages

click on tools and install package. ##control+alt+i=>to insert chunk. cntrl+R=> to execute selected chunk.

>install.package("ggplot")#this is inline r code which does not execute.

TO GET the lines typed in new line type double space after every line.

this
there
where

to get help from R,type

help(mean)
## starting httpd help server ... done

NA in function for finding sd

x<-c(1,2,3,NA)
sd(x,na.rm=TRUE)
## [1] 1
sd(x,TRUE)
## [1] 1
sd(na.rm = TRUE,x)
## [1] 1
sd(TRUE,x=x)
## [1] 1

place to turn

.r-help@r-project.org
.stackoverflow
.github issue ## create one 5 dimensional vector of values4,7,3,2,5 as ‘x’

x<-c(4,7,3,2,8)
x
## [1] 4 7 3 2 8

add 2 with x and assign the value to y

y<-x+2
y
## [1]  6  9  5  4 10

find the mean and sd of y

mean(y)
## [1] 6.8
sd(y)
## [1] 2.588436

create another variable z as combination of 2,3

z<-c(2,3,NA,NA,NA)

add x and z

x+z
## [1]  6 10 NA NA NA