John Bastiaansen
For this course, R has been installed on your computers
When R is installed it comes with the program’s GUI (Graphical User Interface) which looks like this:
We don’t use this GUI in our course, instead we use RStudio
You can use R as a simple calculator:
(1+3)* (7-3)## [1] 16
1024/256## [1] 4
5^2## [1] 25
exp(pi)-pi## [1] 19.9991
The working directory is R’s default place to look for files, find it using function getwd:
getwd()
dir <- "~/Dropbox/Rcursus/mei2015/john/introduction/"
setwd(dir)
getwd()## [1] "~/Dropbox/Rcursus/mei2015/john/introduction/"
Use the function help.start() to open a help browser page:
In RStudio the help pages open in the lower right panel
Use the ? operator to open a help page on an object or function:
?print to open help on the print function:
In RStudio the help pages open in the lower right panel and can be expanded to full screen view
help.start() , help(object) , help.search('topic')Type q() and R will quit: