>>>>> "Petr" == Petr Klasterecky <[EMAIL PROTECTED]>
>>>>>     on Mon, 23 Apr 2007 14:27:03 +0200 writes:

    Petr> Hi,
    Petr> you seem to have mixed 2 different things:
    Petr> 1) changing a working directory - see ?setwd, ?getwd
    Petr> However, this will NOT load another .Rdata file.

    Petr> 2) loading data - see ?load and ?save, ?save.image - loading new data 
    Petr> image will erase all currently stored objects.

Huuuh??? Not if you use the standard R function  load()!

Nothing is "erased".  If you load objects for which you have
objects in the same name in your workspace, then and only then,
those in the workspace will be replaced by the newly loaded
ones.

For that reason,

   attach("some_file.rda")

is sometimes preferred.
But, as Uwe Ligges has already said:
Working with .Rdata files is not recommended: You should work
with script files ("foo.R"), source() and possibly even own packages
and only save() {and load()/attach()} things that are expensive to rebuild.
And for those, I strongly recommend to use a filename different
from ".Rdata".

Martin Maechler, ETH Zurich

    Petr> Petr


    Petr> Walter Paczkowski napsal(a):
    >> Good morning,
    >> 
    >> I keep copies my .RData file in different directories for different 
projects on Windows XP.  There is an icon on my desktop for each project so all 
I have to do is click on the icon to open R for a specific project, i.e. a 
specific .RData file.  How do I change to another .RData file from within R 
without first closing R?
    >> 
    >> Thanks,
    >> 
    >> Walt Paczkowski

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to