[R] Relative paths in R?
Steve Lianoglou
mailinglist.honeypot at gmail.com
Thu Jul 30 15:41:55 CEST 2009
Hi,
(Sorry, noticed I didn't CC r-help originally)
On Jul 30, 2009, at 8:16 AM, julien cuisinier wrote:
> Dear list,
>
> I use the R CMD BATCH to run a file of R commands (from php for info)
> This file of R commands contains a line to source a configuration
> file "source('path/conf.R')"
> In this configuration file I define some variables, e.g. the path of
> some file (uploaded before this R CMD using php) "PathUpload <-
> 'path/uploads'"
>
> What I would like to achieve is to make this "PathUpload" relative
> to were R is at the time I launch it using the R CMD BATCH command
>
> so I would end up with something like "PathUpload <- './
> uploads'" (as in php in this example)
>
> I could not find anything in help or previous posts...any feedback
> on feasibility appreciated
Does ?getwd help?
-steve
--
Steve Lianoglou
Graduate Student: Computational Systems Biology
| Memorial Sloan-Kettering Cancer Center
| Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact
More information about the R-help
mailing list