[Rd] "[[" strips the S4 class for classes extending environment

Vitalie S. spinuvit.list at gmail.com
Wed Nov 10 12:32:10 CET 2010


Dear Developers,

A recently patched [[ for environment class returns a blank environment for a
children class:

setClass("myenv", contains = "environment")
#[1] "myenv"
env <- new("myenv")
class(env)
#[1] "myenv"
#attr(,"package")
#[1] ".GlobalEnv"
env[["a"]] <- 343
class(env)
[1] "environment"

It looks like not being an intended behavior.

Best, 
Vitalie.



More information about the R-devel mailing list