From Kurt.Hornik@wu-wien.ac.at  Fri Jun 28 10:17:36 2002
From: Kurt.Hornik@wu-wien.ac.at (Kurt Hornik)
Date: Fri, 28 Jun 2002 11:17:36 +0200
Subject: (PR#1715) Re: package `methods' has persistent effects even if
 detached
In-Reply-To: <Pine.GSO.4.44.0206280919500.23166-100000@auk.stats>
References: <200206280551.HAA06028@pubhealth.ku.dk>
 <Pine.GSO.4.44.0206280919500.23166-100000@auk.stats>
Message-ID: <15644.10672.168515.693504@mithrandir.hornik.net>

>>>>> 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


(PR#1715) Re: package `methods' has persistent effects even if detached
Kurt Hornik