Skip to content
Prev 33496 / 398506 Next

R environment variable

On Wed, 18 Jun 2003 11:09:41 +0100 (BST), you wrote:

            
I don't think there is such a thing.  source() looks in the current
working directory, it doesn't use environment variables to do a wider
search.

Of course, you can always make up your own variable, and then do
something like

source(paste(getenv('MYDIR'),'/x1.R',sep=''))

and that will work from anywhere if MYDIR is defined properly.

Duncan Murdoch