Skip to content
Prev 15146 / 63421 Next

Notes on bug reports 3229 and 3242 - as.matrix.data.fram e

On Fri, 11 Feb 2005, Gorjanc Gregor wrote:

            
It is actually much less robust.  It would work for embedded data frames 
of one column, but you could have a list column with entries of different 
lengths. e.g.

X <- data.frame(x=1:2, y = I(list(a=1, b=3:4)))
x y
a 1 1
b 2 Integer,2

With your fix, this becomes an error.  And I could replace those entries 
by data frames containing lists of dates ....

Note that in R-devel write.table does not convert data frames to matrices, 
so this does not arise.  We could treat your example specially, but surely 
it was an error that is better found out about than hushed up.