Some basic but useful commands in R

Post date: Jan 21, 2011 4:18:29 AM

1. Need to clean your screen? Try: Ctrl + L (may not work for Mac).

2. Variables management in workspace:

ls() -- list the variables in the workspace

rm(x) -- remove x from the workspace

rm(list=ls()) -- remove all the variables from the workspace

3. Remove all of the variables in the workspace of R (be careful to use it):

rm(list=ls(all=TRUE))