|
|
|
|
|
2) Download and Install R Package Sand
-
Create 2 directories in My Documents (usually on the Desktop) called myrlib
and rmain (Case sensitive)
-
Create a copy of the R shortcut 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.6.2\bin\Rgui.exe" in the Target Field under the Shortcut
tab.
I add --sdi My Target Location
looks like this:
"C:\ProgramFiles\R\R-2.6.2\bin\Rgui.exe" --sdi -
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.3.zip
and dotFirst.R
(Error in
dotFirst.R corrected on 16May07)
by right clicking on each link, selecting
"save target as" and then place
these files in the My Documents/rmain folder.
REPLACE dotFirst.R if asked.
- If you DO NOT HAVE WRITE PERMISSION
in R program folder Open
dotFirst.R
under Notepad or Wordpad and replace path_to on
line 9 with your own path.
FOR THIS EXAMPLE path_to is "C:/Documents and Settings/User Name/My Documents/Myrlib"
If you DO HAVE WRITE PERMISSION Open
dotfirst.R and change write to TRUE
in line 1 and sand will be installed in the standard R library folder (see
comments in dotfirst.R for details).
If you have sand Version 1.0 or 1.1 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).
- To access the help menu for the SAND package type 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 main page.
- 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 July 14, 2008
|
|
|
|