A very short introduction to R. Pia Wohland. R is… A statistical software Programming language -Free! -Very good in handling and manipulating data sets -very comprehensive, easy to learn -large community, with many contributors -well supported mailing list
See an example in the
Practical this afternoon!
Manage your data
> Command prompt
You can type your commands directly at the command prompt (>) or you can use the
Editor window. The advantage of the editor is, you can save your script
> help() # opens help
> help.start() # opens R-Documentation in a browser window
> help(command) # shows help on “command”
> ?command # shows help on “command”
> library() # Shows which packages are loaded?
> library(help="graphics") # Shows help for package “graphics”
How to use
and their default settings
at the bottom
R is case sensitive!
(beware auto correction)
Decimal separator `.´ not`,´
Character strings are placed in “ “
Where are my data?
To find out in which directory R is working: getwd()
To change the directory: setwd(“pathname”)
When importing your own data: best no spaces in header.