>> where myProject is a package containing all the scripts, written as
>> functions.
>
> Yes, the eventual fate of these functions is expected to be a package. I'd
> like the pushed/pulled code to be runable as is without an intermediate
> step of package creation or gsub()ing hardcoded paths.

You might want to look at load_code in devtools (which is designing
for code stored in packages, but may work for your situation),
otherwise use only relative paths inside your project, and then ensure
people source(, chdir = T) one function that loads everything else.

If your example, all you need to do is
source("path/to/projectStart.r", chdir = T).

Hadley

-- 
RStudio / Rice University
http://had.co.nz/

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to