I'm attaching, detaching, and re-attaching RODBC and data.table. When I perform this process with these packages in this order, I get the following error:
Error : .onLoad failed in loadNamespace() for 'data.table', details:
call: address(x)
error: object 'Caddress' not found
I'm using the latest versions of these packages. This is my initial session info:
R version 3.1.0 (2014-04-10)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Example
pkgs <- c('RODBC', 'data.table') # Note, c('data.table', 'RODBC') will work
for (pkg in pkgs) library(pkg, character.only=TRUE)
for (pkg in paste0('package:', pkgs)) detach(pkg, unload=TRUE, character.only=TRUE)
for (pkg in pkgs) library(pkg, character.only=TRUE)
Added a
.onUnload
method to unloaddata.table
's shared object properly. Since the name of the shared object is 'datatable.so' and not 'data.table.so', 'detach' fails to unload correctly. This was the reason for the issue reported here on SO. Closes #474. Thanks to Matthew Plourde for reporting.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With