Leaflet: Viridis palette not working anymore

Created on 21 Feb 2018  Â·  5Comments  Â·  Source: rstudio/leaflet

I just updated the leaflet package from github and now I get:

library(leaflet)
pal.fit <- colorNumeric(palette = "viridis", domain = c(0,100))
Error: object ‘cividis’ is not exported by 'namespace:viridisLite'

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2012 R2 x64 (build 9600)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] leaflet_1.1.0.9000

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.15       magrittr_1.5       munsell_0.4.3      viridisLite_0.2.0 
 [5] colorspace_1.3-2   xtable_1.8-2       R6_2.2.2           rlang_0.1.6.9003  
 [9] plyr_1.8.4         grid_3.4.3         gtable_0.2.0       htmltools_0.3.6   
[13] crosstalk_1.0.0    lazyeval_0.2.1     digest_0.6.13      tibble_1.4.2      
[17] gridExtra_2.3      shiny_1.0.5        RColorBrewer_1.1-2 ggplot2_2.2.1     
[21] htmlwidgets_1.0    mime_0.5           compiler_3.4.3     pillar_1.1.0      
[25] scales_0.5.0.9000  httpuv_1.3.5      

It worked before. Is it just me?

Most helpful comment

I had the same issue on R3.4.3 . Do an install.packages("viridisLite") first, then install.packages("viridis") . This seemed to fix for me - clue was in the namespace error

All 5 comments

I had the same issue on R3.4.3 . Do an install.packages("viridisLite") first, then install.packages("viridis") . This seemed to fix for me - clue was in the namespace error

Thanks @kim-carter, it works!

Same problem, kim-carter's fix worked.

Thanks kim-carter, worked like a charm.

Thank you @kim-carter

Fixed in #557

Was this page helpful?
0 / 5 - 0 ratings