Subject: Re: [R] Data.frame query
From: Peter Dalgaard BSA (p.dalgaard@biostat.ku.dk)
Date: Mon 26 Jun 2000 - 21:27:59 EST
Message-ID: <x2hfag3cn4.fsf@blueberry.kubism.ku.dk>
r.e.darnell@ncl.ac.uk (R.E. Darnell) writes:
> I think I have a data.frame called "statlab".
>
> > is.data.frame(statlab)
> [1] TRUE
>
> and I can perform summary, dim, ...
>
> but when I try
>
> > attach(statlab)
> Error in attach(statlab) : attach only works for lists and data frames
...
> This has got to be embarrassingly simple.
>
> Any one like to point out my error?
Well, it's not simple to point out from the clues given. Your R
version is a tad old, but I wouldn't expect that to be the problem.
The best guess is that statlab is not really a dataframe, but
something else with a "data.frame" class attached to it. Looking at
the output of str(statlab) could be informative.
-- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b25 : Mon 17 Jul 2000 - 12:33:24 EST