[R] List to dataframe
Johannes Radinger
JRadinger at gmx.at
Wed Feb 8 14:50:13 CET 2012
Hi,
I want to "melt" my list and get certain deskriptive factors (length of a vector etc.) into a dataframe. Best to describe it with an example:
A <- seq(4)
B <- seq(6)
C <- seq(9)
ls <- list(A,B,C) # this is my list with vectors of different length
# thats the dataframe how it should look like:
name length(x) length(x[x>5]) length(x[x<5])
A 4 0 4
B 6 1 4
C 9 4 4
How can that be achieved?
/johannes
--
More information about the R-help
mailing list