Re: [R] Deleted objects keep coming back

2005-01-26 Thread Adaikalavan Ramasamy
When you start you R session, see if it says

  [Previously saved workspace restored]

immediately before the first command prompt.

I think the only way a workspace can be restored automatically is if you
used save.image() at some point, in which case it would save all objects
as a hidden file called ".RData".

Another way a different workspace would have been saved if it was
specified in .Rprofile, Rprofile.site. See help(Startup) for more
information about the order of files that R reads in.


On Wed, 2005-01-26 at 01:47 +0100, Peter Dalgaard wrote:
> "Ken Termiso" <[EMAIL PROTECTED]> writes:
> 
> > Ah! I think this is what happened -- whenever I restarted R, it would
> > automatically load the previous workspace and its objects (call this
> > workspace 1). Then, when I would attempt to load another workspace
> > (call this workspace 2), it would retain the objects from workspace 1
> > in ADDITION to the objects loaded from workspace 2.
> > 
> > If I load up R, it will say previous workspace restored. If I then
> > type >rm(list=ls()) to delete all objects, and then load another
> > workspace, it will only have the objects from the workspace I loaded...
> > 
> > Am I correct here?
> 
> Yes, but I think you'd be better off to learn about R's command line
> argument in particular --no-restore and --vanilla. If you're not
> starting R from the command line, I'm sure there's a way to pass
> arguments anyway...
>  
>

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


Re: [R] Deleted objects keep coming back

2005-01-25 Thread Peter Dalgaard
"Ken Termiso" <[EMAIL PROTECTED]> writes:

> Ah! I think this is what happened -- whenever I restarted R, it would
> automatically load the previous workspace and its objects (call this
> workspace 1). Then, when I would attempt to load another workspace
> (call this workspace 2), it would retain the objects from workspace 1
> in ADDITION to the objects loaded from workspace 2.
> 
> If I load up R, it will say previous workspace restored. If I then
> type >rm(list=ls()) to delete all objects, and then load another
> workspace, it will only have the objects from the workspace I loaded...
> 
> Am I correct here?

Yes, but I think you'd be better off to learn about R's command line
argument in particular --no-restore and --vanilla. If you're not
starting R from the command line, I'm sure there's a way to pass
arguments anyway...
 

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

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


RE: [R] Deleted objects keep coming back

2005-01-25 Thread Ken Termiso
Ah! I think this is what happened -- whenever I restarted R, it would 
automatically load the previous workspace and its objects (call this 
workspace 1). Then, when I would attempt to load another workspace (call 
this workspace 2), it would retain the objects from workspace 1 in ADDITION 
to the objects loaded from workspace 2.

If I load up R, it will say previous workspace restored. If I then type 
>rm(list=ls()) to delete all objects, and then load another workspace, it 
will only have the objects from the workspace I loaded...

Am I correct here?
Thanks, Andy.
-Ken
From: "Liaw, Andy" <[EMAIL PROTECTED]>
To: "'Ken Termiso'" <[EMAIL PROTECTED]>,r-help@stat.math.ethz.ch
Subject: RE: [R] Deleted objects keep coming back
Date: Mon, 24 Jan 2005 16:04:41 -0500
> From: Ken Termiso
>
> Having a very strange and frustrating problem with v2.0.1
> under Mac OSX
> 10.3. I have several closely related workspaces in the same
> directory that I
> need to keep separate from one another (there are a few
> objects common to
> all workspaces, and then there are other objects that store
> the results of
> different analyses on the common objects, which is why I need
> separate
> workspaces).
>
> When I attempted to delete objects with rm() and then re-save
> the workspace,
> after quitting and restarting R, reloading the workspace, the
> objects were
> still present in the workspace (even though I'd deleted them).
>
> So I deleted the objects again with rm() and also called
> gc(), and saved the
> workspace with a new name. I then quit R and reloaded the
> workspaces, and
> that seemed to work. The deleted objects stayed deleted.
>
> But then an hour later, I came back and reloaded these
> workspaces, and the
> old objects which I'd deleted had come back again. This is
> really annoying
> and I feel like I'm losing my mind! I'm concerned that R is
> not accessing
> the directory properly, and may be reading one workspace file
> in place of
> another. This would completely jeopardize my work.
>
> Please help!
> Thanks in advance,
> Ken
Are you sure the objects that won't go away are actually in the workspace
you think they're in?  What are the exact commands you used to check?  How
did you load the workspaces (the commands, please)?  Please show the exact
sequence of what you did and what you saw.
Andy
--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity 
named on this message.  If you are not the intended recipient, and have 
received this message in error, please notify us immediately by reply 
e-mail and then delete it from your system.
--
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Deleted objects keep coming back

2005-01-24 Thread Liaw, Andy
> From: Ken Termiso
> 
> Having a very strange and frustrating problem with v2.0.1 
> under Mac OSX 
> 10.3. I have several closely related workspaces in the same 
> directory that I 
> need to keep separate from one another (there are a few 
> objects common to 
> all workspaces, and then there are other objects that store 
> the results of 
> different analyses on the common objects, which is why I need 
> separate 
> workspaces).
> 
> When I attempted to delete objects with rm() and then re-save 
> the workspace, 
> after quitting and restarting R, reloading the workspace, the 
> objects were 
> still present in the workspace (even though I'd deleted them).
> 
> So I deleted the objects again with rm() and also called 
> gc(), and saved the 
> workspace with a new name. I then quit R and reloaded the 
> workspaces, and 
> that seemed to work. The deleted objects stayed deleted.
> 
> But then an hour later, I came back and reloaded these 
> workspaces, and the 
> old objects which I'd deleted had come back again. This is 
> really annoying 
> and I feel like I'm losing my mind! I'm concerned that R is 
> not accessing 
> the directory properly, and may be reading one workspace file 
> in place of 
> another. This would completely jeopardize my work.
> 
> Please help!
> Thanks in advance,
> Ken

Are you sure the objects that won't go away are actually in the workspace
you think they're in?  What are the exact commands you used to check?  How
did you load the workspaces (the commands, please)?  Please show the exact
sequence of what you did and what you saw.

Andy

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