Bug 15481 - Inappropriate warnings from detach("package:hexbin", unload=TRUE)
Inappropriate warnings from detach("package:hexbin", unload=TRUE)
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Add-ons
R 3.0.1
All All
: P2 enhancement
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-09 19:11 UTC by Bill Dunlap
Modified: 2013-11-04 09:20 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Dunlap 2013-10-09 19:11:22 UTC
I think the warnings from unloadNamespace() below go away if I remove
the 'import(methods)' from hexbin/NAMESPACE, but I haven't tracked
down the root cause.  I see it on Windows and Linux and in R-2.15.3 and R-3.0.2.
hexbin has apparently been orphaned, but this problem may be more generic.

> library(hexbin)
Loading required package: grid
Loading required package: lattice
> packageVersion("hexbin")
[1] ‘1.26.2’
> detach("package:hexbin", unload=TRUE)
Warning messages:
1: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-08 15:08:45’, when none found
2: In FUN(X[[2L]], ...) :
  Created a package name, ‘2013-10-08 15:08:45’, when none found
> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)

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

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

other attached packages:
[1] lattice_0.20-23
Comment 1 Duncan Murdoch 2013-10-13 12:43:43 UTC
I've traced it partially.  The warning is coming from methods:::.removeSuperclassBackRefs.  However, I don't know the code well enough to attempt to fix it.
Comment 2 John Chambers 2013-10-18 18:17:14 UTC
Fixed in r-devel and 3.0.2 patched.

That said, unloading namespaces can be tricky in special circumstances.  Information stored from the package can be removed in most cases, but if it hid earlier information, that cannot generally be restored.

For 3.1.0, a clarification and cleanup of class information (esp. subclass information) would be good, to avoid such things as assigning over locked binding in assignClassDef.