[R] Where is global environment?

2004-07-15 Thread Mike Prager
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.

Thanks.
--
Michael Prager, Ph.D.
Population Dynamics Team, NMFS SE Fisheries Science Center
NOAA Center for Coastal Fisheries and Habitat Research
Beaufort, North Carolina  28516
http://shrimp.ccfhrb.noaa.gov/~mprager/
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Where is global environment?

2004-07-15 Thread Mike Prager

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
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Where is global environment?

2004-07-15 Thread Duncan Murdoch
On Thu, 15 Jul 2004 14:15:28 -0400, Mike Prager
[EMAIL PROTECTED] wrote :

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.

I don't think R can do that reliably.  Appendix B of the Intro manual
describes the startup sequence.  .RData generally comes from the
current directory, but that's not necessarily the same at the time you
test as it was when R started.

Duncan Murdoch

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html