From rpeng at jhsph.edu  Tue Nov 23 15:14:17 2004
From: rpeng at jhsph.edu (Roger D. Peng)
Date: Tue Nov 23 15:14:29 2004
Subject: [Rd] str() resets class for environments
Message-ID: <41A345B9.4070104@jhsph.edu>

I noticed the following today --- str() seems to remove any extra 
class information added to an environment.

 > e <- new.env()
 > class(e)
[1] "environment"
 > class(e) <- c("foo", class(e))
 > class(e)
[1] "foo"         "environment"
 > str(e)
Classes 'foo', 'environment' length 0 <environment>
 > class(e)
[1] "environment"

I'm not sure if this is related to the external pointer issue 
mentioned in the NEWS file.  Is this the intended behavior for 
environments?  (It happens in today's R-devel also.)

 > version
          _
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status
major    2
minor    0.1
year     2004
month    11
day      15
language R
 >

-roger
-- 
Roger D. Peng
http://www.biostat.jhsph.edu/~rpeng/


[Rd] str() resets class for environments
Roger D. Peng