Re: [R] Where is global environment?

From: Duncan Murdoch <>
Date: Fri 16 Jul 2004 - 04:41:16 EST

On Thu, 15 Jul 2004 14:15:28 -0400, "Mike Prager" <> 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 mailing list PLEASE do read the posting guide! Received on Fri Jul 16 05:04:34 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:00 EST