From wdunlap at tibco.com  Fri Mar 12 23:52:05 2010
From: wdunlap at tibco.com (William Dunlap)
Date: Fri, 12 Mar 2010 14:52:05 -0800
Subject: [Rd] symbol name caching bug: attributes get tied to symbol names
Message-ID: <77EB52C6DD32BA4D87471DCD70C8D70002A0F980@NA-PA-VBE03.na.tibco.com>

In R versions 2.10.1 and "2.11.0 Under development
(unstable) (2010-03-07 r51225)" on Windows I get the
following if I type the commands at the start of
the session.  Note how the attribute attached to
the name "Response" by the initial call to structure()
seems to get tied to that name for the remainder of
the session:

   > z <- structure(quote(Response), isResponse=TRUE)
   > parse(text="Response~Predictor")[[1]][[2]]
   Response
   attr(,"isResponse")
   [1] TRUE
   > quote(Response~Predictor)[[2]]
   Response
   attr(,"isResponse")
   [1] TRUE
   > quote(Response)
   Response
   attr(,"isResponse")
   [1] TRUE

The attribute actually does go away after quite a
while, but I haven't figured out the trigger.
rm(z) followed by gc() does not affect it.

If I use an unadorned variable called Response before
making the structure z, then the isResponse attribute
doesn't seem to stick to the name Response.


Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 



[Rd] symbol name caching bug: attributes get tied to symbol names
William Dunlap