Pairlist & Dataframe
Ennapadam Venkatraman <venkat at biosta.mskcc.org> writes:
Is this a feature/bug or am I missing something:
R : Copyright 1999, The R Development Core Team
Version 0.63.2 (January 12, 1999)
......
> ls()
character(0)
> x <- NULL
> x$x1 <- rnorm(10)
> x$x2 <- rnorm(10)
> mode(x)
[1] "pairlist"
> as.data.frame(x)
Error: can't coerce pairlist into a data.frame
This is a bug. Pairlists shouldn't show up in "normal" usage. The workaround is to start off with x<-list() instead. Cc'ed to r-bugs (Congratulations, that makes PR#100, I believe...)
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._