Skip to content
Prev 26245 / 63424 Next

modifying large R objects in place

In my previous email, I sent the example:
This is misleading. The correct version is
   a <- matrix(as.integer(1),nrow=14100,ncol=14100) # 774m
   a[1,1] <- as.integer(0) # 1.5g
   gc() # 774m

So, the object duplicates, but nothing more.

The main part of my previous email (question concerning
a possible bug in the behavior of nrow(a) and ncol(a))
remains open.

Petr Savicky.