Knowledge Base
Unix Research - R
What is R?
From the R website "R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R."
Where is R availible?
R is currently available on:
- research2.cob.ohio-state.edu
- research3.cob.ohio-state.edu
How do I run R?
You can enter the interactive R enviroment by typing "R" at a shell prompt.
How do I access R's online help?
You can get help on a topic with either:
help( topic )? topic
Can I save an interactive session (workspace) and return to it later?
You can save your default workspace in three ways:
- Answer "yes" to the save workspace question on quitting R
- quit R with
q("yes") - use command
save.image()
Your default workspace is resumed when R starts interactively the next time.
Can I have multiple saved workspaces?
You can also save multiple named workspaces with the command save.image(" filename ")
To resume an named workspace load(" filename ", .GlobalEnv)
Why can't I see plots generated in R?
You need to be running an X server to see plots on your screen. See the X Windows section for information about obtaining and installing X Windows on your client workstation.
How do I save my plots for inclusion in papers?
To save a plot you need to change the graphics device using one of the following functions based on the file type you wish to create.
pdf()ps()jpeg()png()
Please see R's online help for specific information on each of the above functions.
To stop saving plots and return to the interactive X11 display issue a dev.off()





