On Fri, 10 Mar 2006, Adaikalavan Ramasamy wrote:
>
> The attach function appears to have two functions now :
Since R 1.1.0, in fact.
> a) attach("lala.rda") loads objects from lala.rda into the search path
> b) attach(obj) makes the named columns of a dataframe or list available
> in the search path. Therefore you only need to type 'aaa' instead of
> obj$aaa or obj[ , "aaa"]
>
> The second is the more popular form of usage.
>
> Personally I would rather not use attach() and prefer to type obj$aaa or
> use in the context of lm( aaa ~ ., data=obj ).
This distinction is relevant only to the second syntax for attach.
Attaching an .rda file is more like loading a package -- it makes the
whole object available, and is very similar to attach() in S-PLUS.
-thomas
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html