Message-ID: <4DD6F8B8782D584FABF50BF3A32B03D801A2BC4F@MSGBOSCLF2WIN.DMN1.FMR.COM>
Date: 2005-09-02T20:51:47Z
From: Brahm, David
Subject: Superassignment (<<-) and indexing
In a clean environment under R-2.1.0 on Linux:
> x <- 1:5
> x[3] <<- 9
Error: Object "x" not found
Isn't that odd? (Note x <<- 9 works just fine.)
Why am I doing this? Because I'm stepping through code that
normally lives inside a function, where "<<-" is appropriate.
-- David Brahm (brahm at alum.mit.edu)