From savicky at cs.cas.cz  Thu Sep 27 15:51:51 2007
From: savicky at cs.cas.cz (Petr Savicky)
Date: Thu, 27 Sep 2007 15:51:51 +0200
Subject: [Rd] modifying large R objects in place
In-Reply-To: <20070927131317.GB7605@cs.cas.cz>
References: <20070926092924.GA9879@cs.cas.cz>
	<7098abec0709261052q3a6b01e2v562f9a88ed81c513@mail.gmail.com>
	<20070927131317.GB7605@cs.cas.cz>
Message-ID: <20070927135151.GC7605@cs.cas.cz>

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

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.



[Rd] modifying large R objects in place
Petr Savicky