I don't think I understand your question but John Fox has written a very nice documentat about scoping and environments on his website. It's probably easy to find the site by googling "John Fox" but, if you can't find it, let me know. As I said, I don't think that I understand your question but, if you loaded a list variable using load("whatever.Rdata"), the variable will just be suitting in your workspace. You don't need to attach anything because load just loads the data right into the workspace. So typing the variable name should show the data.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Waltman Sent: Thursday, September 20, 2007 1:32 PM To: r-help@r-project.org Subject: [R] how can I attach a variable stored in Hi - Any help would be greatly appreciated. I'm loading a list variable that's stored in an .RData file and would like attach it. I've used attach( <file_name> ), but that only lets me see the variable that's stored in the file. As the variable name is of the form "comp.x.x", I've tried using attach( ls( pat="comp" ) ), but get an error as ls() just gives back a string. I've also played around with eval(), but don't really quite get what that function does since it seems to get into the R internals which I don't entirely understand and I haven't found any great unified documentation on R's handling environment and scoping. Thanks, Peter Waltman ______________________________________________ R-help@r-project.org 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. -------------------------------------------------------- This is not an offer (or solicitation of an offer) to buy/se...{{dropped}} ______________________________________________ R-help@r-project.org 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.