[R] Question about managing searching path

Tong Wang wangtong at usc.edu
Tue Oct 17 09:49:13 CEST 2006


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 code,  sometimes it got error and ended before reaching the end, thus
the data is left in the searching path.  
      What 's the right way to make mylist detached no matter what ?

Thanks a lot.

best



More information about the R-help mailing list