> -----Original Message-----
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of Curt Seeliger
> Sent: Wednesday, September 26, 2012 5:51 PM
> To: r-help@r-project.org
> Subject: Re: [R] Is there a way to source from a specific Git repository
> without hardcoding the location everywhere?
> 
> Duncan Murdoch <murdoch.dun...@gmail.com> wrote on 09/26/2012 05:35:00 PM:
> > > ...
> > > I'd like to have the code source files from the 'local' git repository
> > > without modification, where 'local' could mean c:\yada\ for one
> person,
> > > m:\my documents\wetlands\ for another, and
> l:\foo\bar\sharedRemote\wet\ to
> > > another user.
> > > ...
> >
> > Yes.  Use
> >
> > library(myProject)
> >
> > 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.
> 
> Thanks for the quick reply,
> cur
> 
> --
> Curt Seeliger, Data Ranger
> Raytheon Information Services - Contractor to ORD
> seeliger.c...@epa.gov
> 541/754-4638

Curt,

each user could set a PROJECT_PATH environment variable on the local machine, 
and then project script files could contain the code

setwd(Sys.getenv(c('PROJECT_PATH')))


Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA
 

______________________________________________
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