On 21 Sep 2014, at 01:25 , David Winsemius <[email protected]> wrote:
> > Peter; > > Do you know whether the "PWD" value in the result from Sys.getenv() is > supposed to point at the working directory of R started from the command line? > > -- > David. > Yes, that's standard Unix shell behavior: Peter-Dalgaards-MacBook-Air:~ pd$ cd r-devel/BUILD Peter-Dalgaards-MacBook-Air:BUILD pd$ echo $PWD /Users/pd/r-devel/BUILD I.e. it is done by the shell, R just inherits it. Notice that it is just a variable tracking the result of 'cd'. You can set it, but that doesn't actually do anything, except for things that use the PWD variable directly, like the shell prompt Peter-Dalgaards-MacBook-Air:BUILD pd$ export PWD=/foo/bar Peter-Dalgaards-MacBook-Air:bar pd$ pwd /Users/pd/r-devel/BUILD -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: [email protected] Priv: [email protected] _______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
