subset()
summary()
read.table()
write.table()
save()
load()
for
Xapply()
set.seed()
lm()
base
lattice
ggplot2
> 2+2 ## [1] 4 > > 7*17 ## [1] 119 > > sqrt(9) ## [1] 3 > > 3^3 ## [1] 27 > > log(7) ## [1] 1.94591 > > log10(7) ## [1] 0.845098
> sin(pi/2) ## [1] 1 > > pi ## [1] 3.141593 > > options(digits=22) > > pi ## [1] 3.141592653589793115998 > > options(digits=4)
> 1/0 ## [1] Inf > > 2*Inf ## [1] Inf > > -1/0 ## [1] -Inf > > 0/0 ## [1] NaN > > c(1,2,3,NA,5) ## [1] 1 2 3 NA 5 > > mean(c(1,2,3,NA,5)) ## [1] NA > > mean(c(1,2,3,5)) ## [1] 2.75
> ls() #...display list of variables in memory > > ls.str() #...display the structure os the list of variables in memory > > rm(a) #...remove an object > > rm(list=ls()) #...remove ALL objects >
> help(mean) # shorthand for help(mean)
> example(mean) # examples
> help.search("mean") # full information
> help.start() # manuals