From hb at stat.berkeley.edu  Wed Dec  9 02:44:48 2009
From: hb at stat.berkeley.edu (Henrik Bengtsson)
Date: Tue, 8 Dec 2009 17:44:48 -0800
Subject: [Rd] x[c()] <- value sets the mode to mode(value)
Message-ID: <59d7961d0912081744m115639eey980adc50d57ac0fb@mail.gmail.com>

Only for the record,

an unnecessary overhead when nothing is assigned:

> x <- integer(10)
> str(x)
 int [1:10] 0 0 0 0 0 0 0 0 0 0
> x[c()] <- 1.0;
> str(x)
 num [1:10] 0 0 0 0 0 0 0 0 0 0

'x' could equally well have renamed untouched.

/Henrik



[Rd] x[c()] <- value sets the mode to mode(value)
Henrik Bengtsson