[R] How to source files from a search path?
bluesky315 at gmail.com
Sat Feb 13 00:42:14 CET 2010
On Fri, Feb 12, 2010 at 5:28 PM, Bert Gunter <gunter.berton at gene.com> wrote:
> 1. Etiquette on this list is to sign posts with your real name.
> 2. Please use R's Help facilities (beyond RSiteSearch()) first before
> help.search("environment variable")
I guess you are referring to 'Sys.getenv', which is not what I am looking for.
To restate my question:
How to source a file without specifying the full path, but by deriving
the file's full path by searching in an environment variable.
Of course, 'Sys.getenv' will be useful if I want to make such a
function myself. But my question was to look for a better version of
Are you clear about my question now?
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of blue sky
> Sent: Friday, February 12, 2010 2:55 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] How to source files from a search path?
> Suppose some environment variable (say MY_R_INC) has a number of
> paths. I want to source some file relative to some path in $MY_R_INC
> (just as #include in C++ does, which looks for header file in a number
> of directories). I RSiteSearch'ed, but I don't find any function that
> satisfies my need. Could somebody let me know if I overlooked
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help