[R] wait, t(sapply()) does not work

Spencer Graves spencer.graves at pdf.com
Thu Apr 17 02:13:13 CEST 2003

What are the symptoms?

Do "sapply(tester.L, data.class)".  If some of the attributes of 
tester.L are data.frames, then do, e.g., "sapply(tester.L[[1]], 
data.class)".  If the objects passed to "function(x) x <- x[1,]" are 
data.frames, the ouput of "function(x)x <- x[1,]" may be a list, not a 
vector, with attributes of different classes.


Remko Duursma wrote:
> I just noticed that the code
> data.frame(t(sapply(tester.L, function(x) x <- x[1,])))
> does not result in a nice dataframe, although is.data.frame gives TRUE. It works on the small example in the previous emails, but something weird happens for a larger dataset.
> remko
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

More information about the R-help mailing list