Professional Documents
Culture Documents
type command , highlight it and hit enter (ctrl +R) in r window. <-output
or
shift + end -<- select the command from point of cursor to right side ...(whole line)
Shift + ctrl +end -<- selec all the lines from the point of cursor to (right) end of script.
shift + alt -<-select the command from point of cursor to left side ...(whole line)
Shift + alt +end -<- selec all the lines from the point of cursor to (right) end of script.
ex:
x<- 2
y<- 3
x+y
z<- "hello"
hello
x+z
error!
C combine function :
c(1,2)
12
x<- c(1,2)
x+5
Shortcut :
45:48
c(45,46,47,48)2
90 92 94 96
>x
> length(x)
[1] 7
> x[2]
[1] 315
> y<-x(4:7)
> y<-x[4:7]
>y
> length(x)==length(y)
[1] FALSE
>
> w<-data.frame(names=c("keerthana","kavya","chinamyi"),age=c(15,14,16))
>w
names age
1 keerthana 15
2 kavya 14
3 chinamyi 16
> w[ , ]
names age
1 keerthana 15
2 kavya 14
3 chinamyi 16
> w[2:3, ]
names age
2 kavya 14
3 chinamyi 16
> w[2:3]
> w[2]
age
1 15
2 14
3 16
> w[1]
names
1 keerthana
2 kavya
3 chinamyi
> w[1,2]
[1] 15
> w[3,1]
[1] chinamyi
Levels: chinamyi kavya keerthana
> w[2,1]
[1] kavya
> w[1,1]
[1] keerthana
> w[2,2]
[1] 14
> w[3,2]
[1] 16
>