Skip to content

Pairlist & Dataframe

2 messages · E. S. Venkatraman, Peter Dalgaard

#
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

Thanks,
E. S. Venkatraman
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Ennapadam Venkatraman <venkat at biosta.mskcc.org> writes:
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...)