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.s
I think you really have to show use your exact code that you did along
with an 'str' of each intermediate data structure since my quick test
does not bear out what you were saying:
> test.df <- data.frame(a1= 1:6, a2= 1:6, a3 = 1:6, a4 = 1:6, a5 = 1:6, a6 = 1:6
+ , a7=1:6, a8 = 1:6, a9 = 1:6,
Hi,
I had a query regarding which object, a list or a dataframe, consumes more
R memory. Let me clarify this:
For example, I have a df of 6 rows and 12 columns, say 'test'. I do
object.size() and find it uses 3.3 KB of memory.
I run a loop and make a list, say 'testlist', of 6 elements, each ele
3 matches
Mail list logo