isciences / exactextractr

R package for fast and accurate raster zonal statistics
https://isciences.gitlab.io/exactextractr/
272 stars 26 forks source link

Warning: multiple methods tables found #67

Closed dholstius closed 2 years ago

dholstius commented 2 years ago

Summary

Invoking library(exactextractr) from within a clean R 3.6.2 session (R –vanilla) results in two warnings:

1: multiple methods tables found for ‘direction’ 
2: multiple methods tables found for ‘gridDistance’ 

Notes

Reprex

$ R --vanilla

Clean session:

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
[1] compiler_3.6.2

Loading exactextractr:

> library(exactextractr)
Warning messages:
1: multiple methods tables found for ‘direction’ 
2: multiple methods tables found for ‘gridDistance’ 

In case helpful: here's what's subsequently attached and loaded.

> sessionInfo()
R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.16

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
[1] exactextractr_0.6.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7         raster_3.5-11      magrittr_2.0.1     units_0.7-2       
 [5] tidyselect_1.1.1   lattice_0.20-45    R6_2.5.1           rlang_0.4.12      
 [9] fansi_1.0.0        dplyr_1.0.7        tools_3.6.2        grid_3.6.2        
[13] utf8_1.2.2         KernSmooth_2.23-20 terra_1.5-12       e1071_1.7-9       
[17] DBI_1.1.2          ellipsis_0.3.2     class_7.3-19       assertthat_0.2.1  
[21] tibble_3.1.6       lifecycle_1.0.1    crayon_1.4.2       sf_1.0-5          
[25] purrr_0.3.4        vctrs_0.3.8        codetools_0.2-18   glue_1.6.0        
[29] sp_1.4-6           proxy_0.4-26       compiler_3.6.2     pillar_1.6.4      
[33] generics_0.1.1     classInt_0.4-3     pkgconfig_2.0.3
dbaston commented 2 years ago

Thanks for the report. Does library(raster) not give the same error, in a clean session?

dholstius commented 2 years ago

Thanks for the suggestion! Yes, it looks like library(raster) gives the same error in a clean session. Should I file the issue there instead then?

> library(raster)
Loading required package: sp
Warning messages:
1: multiple methods tables found for ‘direction’ 
2: multiple methods tables found for ‘gridDistance’
rhijmans commented 2 years ago

This is caused by changes in terra 1.5-12 that was published on CRAN today. These messages go away if you (re-) install raster after installing terra 1.5-12

dholstius commented 2 years ago

Thanks @rhijmans, that indeed fixed it. Closing.