(PR#1715) Re: package `methods' has persistent effects even if detached
Prof Brian D Ripley writes:
Sorry, forgot to say this is in R-devel (2002-06-27) but not in 1.5.1.
class
.Primitive("class")
find("class")
[1] "package:base"
library(methods) class
.Primitive("dataClass")
find("class")
[1] "package:methods" "package:base"
get("class", "package:base")
.Primitive("dataClass")
detach("package:methods")
class
.Primitive("dataClass")
so attaching methods is altering the class object *in base*. Related to namespaces?
A problem in library(), maybe? All I see is R/class.R:class <- dataClass but surely assignments should be in methods and not in base? -k -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._