initrwm {rwm}R Documentation

Initialize the setup for the rwm package

Description

Provides a simple method of initializing your R workspace so you can use the rwm package. This function is normally only ever used one time. Initialization is easily done manually without this function at all. See below for manual instructions.

Usage

initrwm()

Details

You can run this function or do it manually as described below:

MANUAL METHOD

    1)
    start R by clicking on icon and entering command
    2)
    define variables: .UserDirectory and .UserDate
    3)
    define function .First function as described below
    4)
    enter command: save.image()
    4)
    q()

.UserDirectory This defines where you want to save your R workspaces. For Microsoft Windows, I use: .UserDirectory<-"d:/r/". For Mac OS X, I use: UserDirectory<-"/Users/aim/r/". For unix, I use: .UserDirectory<-/home/aim/R/.

.UserDate Currently I use: UserDirectory<-2009. This defines the subdirectory for current R workspace directories. To ignore this, option just set .UserDirectory<-"" or perhaps. UserDirectory<-"current" Another possible if might be .UserDirectory<-"2008-Jan".

.First My .First function with Windows: .First <- function() library(RWinEdt)

Of course there are other possible libraries or initializations you might want to add to your .First function.

Value

The global variable .UserDirectory and .UserDate are defined.

Note

If an invalid .UserDirectory is given, an error results and the function terminates.

This function makes extensive uses of the R File and Directory Manipulation functions.

Author(s)

A.I. McLeod

See Also

files, save.image

Examples


#you will be prompted for '.UserDirectory' and '.UserDate'

## Not run: 
initrwm() 
## End(Not run)


[Package rwm version 1.35 Index]