I have a huge list (700 elements), each element being a vector of length = 16,000. I am looking for an efficient way of converting the list to a dataframe, in the following fashion (this is just a mock example):
lst <- list(a = c(1,2,3), b = c(4,5,6), c = c(7,8,9))
The end result I am looking for is:
# [,1] [,2] [,3]
#a 1 2 3
#b 4 5 6
#c 7 8 9
This is what I have tried, but isn't working as I wish:
library(data.table)
result = rbindlist(Map(as.data.frame, lst))
Any suggestion? Please keep in mind that my real example has huge dimensions, and I would need a rather efficient way of doing this operation.
Thank you very much!