Skip to content
Back to formatted view

Raw Message

Message-ID: <1073924724.32620.36.camel@xizor.incogen.com>
Date: 2004-01-12T16:25:24Z
From: John Hayes
Subject: source problem

Hi,

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,

/usr/local/algo/R/script/firstScript.r 
/home/john/R_script/secondScript.r
/home/john/R_script/thirdScript.r

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.

John