Have you tried first creating a data.frame of the ultimate size and then
assigning the pieces of it in a for loop?
hope this helps. spencer graves
JedSimons@aol.com wrote:
I have a large number of dataframes, themselves each quite large. I
would like to rbind them all together in an efficient way, but have
failed to do so using several methods. They are all of the same form,
and collected together in a list.
The best I've come up is to concatenate each column one at at time eg
y <- as.vector(unlist(sapply(data.list, function(x) x$y)))
where y is the column ID
and data.list is the list of dataframes
and then cbind them all together.
I have tried using a nested lapply to unlist all the columns in one
swift function but have been unable to make this work. The other
alternative would to extract each dataframe as data.list[[1]],
data.list[[2]] and then rbind them all together, but it seems even less
good.
Can anyone suggest a better way of doing this ?
Many thanks
Jed Simmons
|