[R] source problem

John Hayes jahaye at wm.edu
Mon Jan 12 17:25:24 CET 2004


I'm trying to call an R script from the command-line ("firstScript.r"
below).  This script then sources another script in another directory
using the absolute path to the file
("/home/john/R_script/secondScript.r").  That script then needs to
source an R script in the same directory using a relative path
("thirdScript.r").   Neither script should know that it is being
sourced.  For example,


However, I am getting a message that this last file cannot be found. 
I've changed the chdir and local attributes of source to TRUE and this
does not seem to change the behavior.  Is there a way to do this without
passing the absolute path to the R files around?  Thanks for any help
you can offer.


More information about the R-help mailing list