First, install it.
There are 32 and 64 http://cran.rstudio.com/bin/windows/base/R-3.2.1-win.exe inside.
R has a lot of packages, if some packages are not local, come here to search
http://cran.r-project.org/
Automatic installation command:
Install.packages (' The name of the package ')
will be installed automatically, this package depends on the package will also be installed, the first time you install will let you choose mirror site, I certainly choose Xiamen, away from me recently.
If it fails, go to the website above to download it. Download the zip format, if you are using Rstudio,
Choose Tools, install Packages, local installation is OK.
Rstudio interface Introduction (Figure stole):
What package to use to load first, just like the import of Python. Command:
Library (package name)
Tab completion function
If you don't understand, ask:
? Base or help (base)
? function Display Help information example (function) Display example
Use # Single Comment
Each time you close, you are prompted to save your workspace. Save it will record your history command, define the object and so on, next time you can do it.
Win7 default is saved in ' c:/users/freemao/documents ' default file name is. RData and. Rhistory
Specify the Save workspace: Save.image (' file_name. RData ')
Reads a workspace to the current session load (' file_name. RData ') defaults to. RData
Delete the saved space: File.remove (' file_name. RData ')
View current working directory: GETWD ()
Modify the current working directory: SETWD (' dir ')
History () View historical commands
LS () Lists all objects in the current workspace
RM () Delete one or more objects
Save the specified object to a file: Save (ObjectList, file= ' my file ')
The next time you want to use the direct load (' My file ') These objects can be used, of course, can also be deleted, with File.remove (' My file ')
Summarize:
How to install R packages
Workspace save, load, delete
Common commands
Library (),
Install.packages ()
Example (),
Help (),
?,
History ()
LS (),
RM (),
GETWD (),
SETWD (),
Save (),
Save.image (),
Load (),
File.remove (),
R Learning 1