[R] Deleted objects keep coming back

Liaw, Andy andy_liaw at merck.com
Mon Jan 24 22:04:41 CET 2005


> 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




More information about the R-help mailing list