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

From: Vitalie S. <spinuvit.list_at_gmail.com>
Date: Wed, 10 Nov 2010 12:32:10 +0100

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.



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 10 Nov 2010 - 11:34:10 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 11 Nov 2010 - 00:20:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive