2) Download and Install R Package Sand
- Create a directory in My Documents (usually on the Desktop) for example "rmain" (Case sensitive).
- Create a copy of the R shortcut on the Desktop by right clicking and select copy, then paste it in My Documents/rmain directory.
- Right click the new R shortcut and select properties.
- The location of Rgui.exe must be in the Target Location Box. To check this right click on R-Icon and then left click on Properties. You should see "C:\Program Files\R\R-2.9.1\bin\Rgui.exe" in the Target Field under the Shortcut tab.
- The Start In Box must contain the complete path to rmain folder---for this example
"C:\Documents and Settings\User Name\My Documents\rmain ".
- Download sand_1.4.zip by right clicking on the link, selecting "save target as" and then place the file in the My Documents/rmain folder. Download dotFirst.txt, by right clicking on it, select "save target as", change the name to dotFirst.R and place in the My Documents/rmain folder. REPLACE dotFirst.R if asked (error in dotFirst.R corrected on 16May07.)
- If you have sand Version 1.0, 1.1, 1.2 or 1.3 installed change update to TRUE on line 1 in dotfirst.R Save the changes and close Notepad.
- Now run R by double clicking on the R-Icon in My Documents/rmain folder.
- Left click on File in upper left corner (see below) of the R Console and select Source R code.
- Left click on dotfirst.R
and then left click on the Open Box (lower right).
Once dotfirst.R is
sourced in type: .First(TRUE)
and press [Enter] on the R command
line. This will remove the old version of sand(if
there is one), install the new sand package (Version
1.1) and attach it to the current session.
If you exit R the next time you run R the .First
function will run and attach the sand package (see
step l below).
- The best way to access help files depends on which version of R you are using.
For version 2.9.2 and earlier, access the help menu for the SAND package by typing
the name of the function or dataset you are interested in preceded by a ? For
example in the R console type ?IH.Summary and press Enter will open the help
file and give examples at the bottom on how to utilize this function. Type ?sand
Enter will open the help file for sand package-- see also Item 4 on home page.
For the latest version R 2.10.0 use help.start() this will open help file in
Internet Explorer then *select Packages then sand.
- To end the R session select Exit from the file menu or type q()
and press [Enter] after
the prompt. BE SURE TO ANSWER Yes to the question
"Save workspace image".
This page was last updated on
December 10, 2012