On Wed, 12 Jul 2006, Martyn Plummer wrote: > My guess is that even though the zoo namespace is unloaded. The S3 > method as.Date.numeric is still registered, and the name space will be > reloaded whenever it is dispatched. > > library(zoo) > > loadedNamespaces() > [1] "base" "graphics" "grDevices" "methods" "stats" "utils" > [7] "zoo" > > unloadNamespace("zoo") > <environment: namespace:zoo> > > loadedNamespaces() #Gone > [1] "base" "graphics" "grDevices" "methods" "stats" "utils" > > as.Date(1) > [1] "1970-01-02" > > loadedNamespaces() #Back again! > [1] "base" "graphics" "grDevices" "methods" "stats" "utils" > [7] "zoo" > > So the question is whether there is a way to unregister an S3 method, so > that you can restore the method dispatching behaviour prior to the > package being loaded. I don't know the answer, but I'm guessing it's no.
It is no. Namespaces don't work that way: one would have to keep a stack of past registered methods to be able to back out a registered method. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595 ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html