Conclusion: From this and other experiences, I have found three ways to specify file names:
(1) If the complete path and file name are supplied for an existing file, 'source' will find it.
(2) If a file is in the working directory, specifying that name will get it.
(3) If a file is in a subdirectory of the working directory, e.g., "d:/sg/proj1/sub1/tst-source.R", then specifying "source('sub1/tst-source.R')" will get it.
hope this helps. spencer graves
Shin, Daehyok wrote:
Exactly where does R search for foo.R if I type source(“foo.R”)? Only from current working directory (same as getwd()), from all directories specified by e.g. $PATH? Thanks.
Daehyok Shin
______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html