Skip to content
Prev 293712 / 398513 Next

Query about memory used in list and dataframe

Hello,

Also, note that to rbind data frames, like the op says, takes less memory
than to cbind.


x <- 1:6
list.1 <- list(x,x,x,x,x,x,x,x,x,x,x,x)
test.df3 <- as.data.frame(do.call(cbind, list.2))
test.df4 <- as.data.frame(do.call(rbind, list.2))

object.size(list.1)
object.size(test.df3)
object.size(test.df4)

(More columns == more variables == more memory.)

Rui Barradas


jholtman wrote
--
View this message in context: http://r.789695.n4.nabble.com/Query-about-memory-used-in-list-and-dataframe-tp4611896p4612876.html
Sent from the R help mailing list archive at Nabble.com.