[R] R environment variable
Duncan Murdoch
dmurdoch at pair.com
Wed Jun 18 12:53:29 CEST 2003
On Wed, 18 Jun 2003 11:09:41 +0100 (BST), you wrote:
>which R environmen variable can be used to point to
>x1.R so that it can be sourced in any directory?
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
More information about the R-help
mailing list