[R] attaching something.RData in pos=1

Peter Perkins pperkins at ucsd.edu
Thu Oct 5 22:26:53 CEST 2000

hi -

running R 1.1.1 under LinuxPPC:

i was pleasantly surprised to find that attaching .RData files was added
somewhere along the line, but i am having trouble getting the sort of
behavior that i got used to in S.  specifically, i'd like to be able to
attach() a file at pos=1 and edit its contents directly, then save() and
detach() it.  i know i can load() the file, but this merges its contents
with the current global environment.  i could attach() at pos=2, but
that makes editing/creating/deleting awkward.  i could q() and restart R
from another directory, but that is also awkward.

i guess i still haven't quite figured out how the global environment is
supposed to work.  when i attach(file, pos=1), R does something funny: 
it seems to do a load(file) and then put an empty (at least ls() sees it
as empty) reference to the file in the search list at pos=2.

i'm happy to modify my behavior from S as long as i can get a simple way
to work on several separate projects.  can't find this in the archives. 
thanks for any help.

- peter
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list