[R] Question about managing searching path

2006-10-17 Thread Tong Wang
Hi all, I'm having sometrouble with managing the seach path, in a function , I need to attach some data set at the begining and detach them at the end, say, myfunction- function() { attach(mylist); .detach(mylist) } , the problem is, since I am still debugging this

Re: [R] Question about managing searching path

2006-10-17 Thread vito muggeo
Dear Tong I think on.exit() makes the job..Namely: attach(Yourdata) on.exit(detach(YourData)) vito Tong Wang wrote: Hi all, I'm having sometrouble with managing the seach path, in a function , I need to attach some data set at the begining and detach them at the end, say,

Re: [R] Question about managing searching path

2006-10-17 Thread Duncan Murdoch
On 10/17/2006 3:49 AM, Tong Wang wrote: Hi all, I'm having sometrouble with managing the seach path, in a function , I need to attach some data set at the begining and detach them at the end, say, myfunction- function() { attach(mylist); .detach(mylist) } ,