[R] Data.frame query
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Jun 26 13:27:59 CEST 2000
r.e.darnell at 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 at 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 at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list