[R] Where is global environment?

Mike Prager Mike.Prager at noaa.gov
Thu Jul 15 20:27:54 CEST 2004


>>I am using R 1.9.1 under Windows XP Professional.
>>Is there any R function that returns the filesystem path from which the 
>>global environment (workspace) was loaded (and to which it will, by 
>>default, be saved)?  This seems identical with the current directory, so 
>>in any given session it is not too difficult to find out by other 
>>means.  But for several reasons I would like to find this out from within R.
>
>Is ?getwd suitable?

Yes!   My thanks to Sundar Dorai-Raj, Rolf Turner, and Chuck Cleland for 
supplying the answer within minutes of my query.

(I had tried pwd(), cwd(), and so on, and tried looking in the help. It 
*can* be hard to find things sometimes....)

Mike




More information about the R-help mailing list