[Rd] Detaching one package can remove the S4 methods of another (PR#14087)

From: <ripley_at_stats.ox.ac.uk>
Date: Thu, 26 Nov 2009 09:15:09 +0100 (CET)


Putting on public record

library(spdep)
showMethods("[")
detach("package:spdep", unload = TRUE)
detach("package:Matrix", unload=TRUE)
showMethods("[") # sp methods still there detach("package:spam", unload = TRUE)
showMethods("[") # sp methods have gone

This is one of several examples found by package testing in R-devel (this one from BayesX) with _R_CHECK_UNLOAD_NAMESPACES_ set.

Session info after the first command:
R version 2.10.0 Patched (2009-11-23 r50545) x86_64-unknown-linux-gnu

locale:
[1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C
[3] LC_TIME=en_GB.utf8 LC_COLLATE=C
[5] LC_MONETARY=C LC_MESSAGES=en_GB.utf8
[7] LC_PAPER=en_GB.utf8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] spdep_0.4-52 nlme_3.1-96 coda_0.13-4 MASS_7.3-4
[5] Matrix_0.999375-32 lattice_0.17-26 spam_0.15-5 boot_1.2-41
[9] maptools_0.7-26 foreign_0.8-38 sp_0.9-47 deldir_0.0-10

loaded via a namespace (and not attached): [1] grid_2.10.0

Happens also in 2.10.0 and
R version 2.11.0 Under development (unstable) (2009-11-25 r50568)

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
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-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 26 Nov 2009 - 08:23:01 GMT

This archive was generated by hypermail 2.2.0 : Thu 26 Nov 2009 - 13:50:50 GMT