mapview icon indicating copy to clipboard operation
mapview copied to clipboard

viewRGB() 'extent': NA issue

Open fdetsch opened this issue 4 years ago • 1 comments

Upon running the first example in ?viewRGB, I get

library(mapview)
library(plainview, include.only = "poppendorf")

viewRGB(poppendorf, r = 4, g = 3, b = 2)

Error in h(simpleError(msg, call)) :    error in evaluating the argument 'x' in selecting a method for function 'extent': NA

sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252   
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

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

other attached packages:
[1] plainview_0.1.1 mapview_2.9.8  

loaded via a namespace (and not attached):
[1] clisymbols_1.2.0        tidyselect_1.1.0        remotes_2.2.0          
[4] purrr_0.3.4             sf_0.9-7                lattice_0.20-41        
[7] leaflet.providers_1.9.0 colorspace_2.0-0        vctrs_0.3.6            
[10] generics_0.1.0          viridisLite_0.3.0       htmltools_0.5.1.1      
[13] stats4_4.0.4            base64enc_0.1-3         utf8_1.1.4             
[16] rlang_0.4.10            R.oo_1.24.0             e1071_1.7-4            
[19] pillar_1.5.0            glue_1.4.2              DBI_1.1.1              
[22] R.utils_2.10.1          sp_1.4-5                prompt_1.0.0           
[25] foreach_1.5.1           lifecycle_1.0.0         munsell_0.5.0          
[28] raster_3.4-5            R.methodsS3_1.8.1       htmlwidgets_1.5.3      
[31] codetools_0.2-18        crosstalk_1.1.1         curl_4.3               
[34] class_7.3-18            gdalUtils_2.0.3.2       fansi_0.4.2            
[37] leafem_0.1.4            Rcpp_1.0.6              KernSmooth_2.23-18     
[40] scales_1.1.1            classInt_0.4-3          satellite_1.0.2        
[43] leaflet_2.0.4.1         webshot_0.5.2           png_0.1-7              
[46] digest_0.6.27           dplyr_1.0.4             grid_4.0.4             
[49] rgdal_1.5-23            tools_4.0.4             magrittr_2.0.1         
[52] tibble_3.1.0            crayon_1.4.1            pkgconfig_2.0.3        
[55] ellipsis_0.3.1          assertthat_0.2.1        iterators_1.0.13       
[58] R6_2.5.0                units_0.7-0             compiler_4.0.4

fdetsch avatar Mar 01 '21 07:03 fdetsch

@fdetsch I cannot reproduce this issue on Linux (R 4.0.5).

sessionInfo()
R version 4.0.5 (2021-03-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Pop!_OS 18.04 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
[1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
[4] LC_COLLATE=en_GB.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_GB.UTF-8   
[7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
[1] plainview_0.1.1 mapview_2.9.8  

loaded via a namespace (and not attached):
[1] Rcpp_1.0.6              svglite_1.2.3.2         lattice_0.20-41        
[4] leaflet.providers_1.9.0 png_0.1-7               class_7.3-17           
[7] digest_0.6.27           foreach_1.5.1           utf8_1.1.4             
[10] R6_2.5.0                leafpop_0.0.7           stats4_4.0.5           
[13] e1071_1.7-4             pillar_1.5.1            gdtools_0.2.2          
[16] rlang_0.4.10            uuid_0.1-4              raster_3.4-5           
[19] R.oo_1.24.0             R.utils_2.10.1          rgdal_1.5-18           
[22] webshot_0.5.2           servr_0.21              htmlwidgets_1.5.3      
[25] munsell_0.5.0           compiler_4.0.5          httpuv_1.5.4           
[28] xfun_0.21               pkgconfig_2.0.3         systemfonts_0.3.2      
[31] base64enc_0.1-3         htmltools_0.5.1.1       tidyselect_1.1.0       
[34] tibble_3.1.0            codetools_0.2-16        viridisLite_0.3.0      
[37] fansi_0.4.2             crayon_1.4.1            dplyr_1.0.2            
[40] later_1.1.0.1           sf_0.9-7                R.methodsS3_1.8.1      
[43] grid_4.0.5              jsonlite_1.7.2          lwgeom_0.2-5           
[46] satellite_1.0.2         lifecycle_1.0.0         DBI_1.1.1              
[49] magrittr_2.0.1          units_0.7-0             scales_1.1.1           
[52] KernSmooth_2.23-17      promises_1.1.1          leaflet_2.0.4.1        
[55] sp_1.4-5                ellipsis_0.3.1          brew_1.0-6             
[58] generics_0.1.0          vctrs_0.3.6             iterators_1.0.13       
[61] tools_4.0.5             gdalUtils_2.0.3.2       leafem_0.1.4           
[64] glue_1.4.2              purrr_0.3.4             crosstalk_1.1.1        
[67] yaml_2.2.1              abind_1.4-5             parallel_4.0.5         
[70] colorspace_2.0-0        stars_0.4-3             classInt_0.4-3  

tim-salabim avatar Apr 02 '21 11:04 tim-salabim