Skip to content

Memory clear problem

3 messages · Suzanne E. Blatt, Uwe Ligges, Spencer Graves

#
Hello.

I think this is a simple problem.  I have R running a program which generates variables that it 'remembers'.  The trouble is that I've modified the file that it's generating these variables from but doesn't seem to realize that.  When I type 'trees' - I get the same data set produced.

I tried shutting R down and not saving the workspace, but when I open 'er up again and type 'trees', there is that same data set.  I saw a memory clear command somewhere in one of the help files but I'll be danged if I can locate it now.

Please tell me this is a simple problem with a nice(one-line) solution.

Thanks,
Suzanne
#
Suzanne E. Blatt wrote:

            
From ?rm:
## remove (almost) everything in the working environment.
## You will get no warning, so don't do this unless you are really sure.
rm(list = ls())

Uwe Ligges
#
Hi, Suzanne: 

      R makes a copy of the file and does not operate on the original 
file.  If you want R to see and process the changes, you must reread the 
file and rerun the script to recompute whatever you want. 

      hope this helps. 
      spencer graves
Uwe Ligges wrote: