r-spatial / mapview

Interactive viewing of spatial data in R
https://r-spatial.github.io/mapview/
GNU General Public License v3.0
519 stars 90 forks source link

Error with mapview when knitting rmarkdown: leafpop argument #332

Closed makratofil closed 4 years ago

makratofil commented 4 years ago

Hi,

I'm trying to knit an html rmarkdown document and keep getting this error:

Error in leafpop::popupTable(x, className = "mapview-popup") : unused argument (className = "mapview-popup")
Calls: <Anonymous> ... mapview -> mapView -> mapView -> .local -> leaflet_sf
Execution halted

I'm using mapview version 2.9.3 installed from github and R version 4.0.2. I've been able to get this code to work using v2.8.1. Here's the code I'm running:

library(sf)
library(mapview)
library(tidyverse)
library(lubridate)
library(leaflet)
library(crawl)

pred <- readRDS("TtTag034_crawl5min_predicted.rds") # predicted trajectory
lines <- pred %>% crw_as_sf(., "LINESTRING", locType = "p") # make sf linestring object of trajectory
lines %>% mapview::mapview(map.types = "Esri.OceanBasemap") # plot 

And my session info:

Session info --------------------------------------------------------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 4.0.2 (2020-06-22)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/Los_Angeles         
 date     2020-09-15                  

- Packages ------------------------------------------------------------------------------------------------------------------------------------------------------------------
 ! package           * version date       lib source                            
   assertthat          0.2.1   2019-03-21 [1] CRAN (R 4.0.2)                    
   backports           1.1.8   2020-06-17 [1] CRAN (R 4.0.2)                    
   base64enc           0.1-3   2015-07-28 [1] CRAN (R 4.0.0)                    
   blob                1.2.1   2020-01-20 [1] CRAN (R 4.0.2)                    
   brew                1.0-6   2011-04-13 [1] CRAN (R 4.0.0)                    
   broom               0.7.0   2020-07-09 [1] CRAN (R 4.0.2)                    
   callr               3.4.3   2020-03-28 [1] CRAN (R 4.0.2)                    
   cellranger          1.1.0   2016-07-27 [1] CRAN (R 4.0.2)                    
   class               7.3-17  2020-04-26 [1] CRAN (R 4.0.2)                    
   classInt            0.4-3   2020-04-07 [1] CRAN (R 4.0.2)                    
   cli                 2.0.2   2020-02-28 [1] CRAN (R 4.0.2)                    
   codetools           0.2-16  2018-12-24 [1] CRAN (R 4.0.2)                    
   colorspace          1.4-1   2019-03-18 [1] CRAN (R 4.0.2)                    
   cpp11               0.2.1   2020-08-11 [1] CRAN (R 4.0.2)                    
   crawl             * 2.2.3   2020-09-15 [1] Github (NMML/crawl@69a4aec)       
   crayon              1.3.4   2017-09-16 [1] CRAN (R 4.0.2)                    
   crosstalk           1.1.0.1 2020-03-13 [1] CRAN (R 4.0.2)                    
   curl                4.3     2019-12-02 [1] CRAN (R 4.0.2)                    
   DBI                 1.1.0   2019-12-15 [1] CRAN (R 4.0.2)                    
   dbplyr              1.4.4   2020-05-27 [1] CRAN (R 4.0.2)                    
   desc                1.2.0   2018-05-01 [1] CRAN (R 4.0.2)                    
   devtools          * 2.3.1   2020-07-21 [1] CRAN (R 4.0.2)                    
   digest              0.6.25  2020-02-23 [1] CRAN (R 4.0.2)                    
   dplyr             * 1.0.1   2020-07-31 [1] CRAN (R 4.0.2)                    
   e1071               1.7-3   2019-11-26 [1] CRAN (R 4.0.2)                    
   ellipsis            0.3.1   2020-05-15 [1] CRAN (R 4.0.2)                    
   epuRate             0.1     2020-09-02 [1] Github (holtzy/epuRate@99e6010)   
   evaluate            0.14    2019-05-28 [1] CRAN (R 4.0.2)                    
   fansi               0.4.1   2020-01-08 [1] CRAN (R 4.0.2)                    
   fastmap             1.0.1   2019-10-08 [1] CRAN (R 4.0.2)                    
   forcats           * 0.5.0   2020-03-01 [1] CRAN (R 4.0.2)                    
   foreign             0.8-80  2020-05-24 [1] CRAN (R 4.0.2)                    
   fs                  1.5.0   2020-07-31 [1] CRAN (R 4.0.2)                    
   gdtools             0.2.2   2020-04-03 [1] CRAN (R 4.0.2)                    
   generics            0.0.2   2018-11-29 [1] CRAN (R 4.0.2)                    
   ggplot2           * 3.3.2   2020-06-19 [1] CRAN (R 4.0.2)                    
   glue                1.4.1   2020-05-13 [1] CRAN (R 4.0.2)                    
   gtable              0.3.0   2019-03-25 [1] CRAN (R 4.0.2)                    
   haven               2.3.1   2020-06-01 [1] CRAN (R 4.0.2)                    
   hms                 0.5.3   2020-01-08 [1] CRAN (R 4.0.2)                    
   htmltools           0.5.0   2020-06-16 [1] CRAN (R 4.0.2)                    
   htmlwidgets         1.5.1   2019-10-08 [1] CRAN (R 4.0.2)                    
   httpuv              1.5.4   2020-06-06 [1] CRAN (R 4.0.2)                    
   httr                1.4.2   2020-07-20 [1] CRAN (R 4.0.2)                    
   jsonlite            1.7.0   2020-06-25 [1] CRAN (R 4.0.2)                    
   KernSmooth          2.23-17 2020-04-26 [1] CRAN (R 4.0.2)                    
   knitr               1.29    2020-06-23 [1] CRAN (R 4.0.2)                    
   later               1.1.0.1 2020-06-05 [1] CRAN (R 4.0.2)                    
   lattice             0.20-41 2020-04-02 [1] CRAN (R 4.0.2)                    
   leafem              0.1.3   2020-07-26 [1] CRAN (R 4.0.2)                    
   leaflet             2.0.3   2019-11-16 [1] CRAN (R 4.0.2)                    
   leaflet.providers   1.9.0   2019-11-09 [1] CRAN (R 4.0.2)                    
   leafpop             0.0.5   2019-12-09 [1] CRAN (R 4.0.2)                    
   lifecycle           0.2.0   2020-03-06 [1] CRAN (R 4.0.2)                    
   lubridate         * 1.7.9   2020-06-08 [1] CRAN (R 4.0.2)                    
   magrittr            1.5     2014-11-22 [1] CRAN (R 4.0.2)                    
   maptools            1.0-1   2020-05-14 [1] CRAN (R 4.0.2)                    
 V mapview             2.9.0   2020-09-15 [1] Github (r-spatial/mapview@f028c83)
   memoise             1.1.0   2017-04-21 [1] CRAN (R 4.0.2)                    
   mime                0.9     2020-02-04 [1] CRAN (R 4.0.0)                    
   modelr              0.1.8   2020-05-19 [1] CRAN (R 4.0.2)                    
   munsell             0.5.0   2018-06-12 [1] CRAN (R 4.0.2)                    
   mvtnorm             1.1-1   2020-06-09 [1] CRAN (R 4.0.0)                    
   packrat             0.5.0   2018-11-14 [1] CRAN (R 4.0.2)                    
   PBSmapping          2.72.1  2019-03-15 [1] CRAN (R 4.0.2)                    
   pillar              1.4.6   2020-07-10 [1] CRAN (R 4.0.2)                    
   pkgbuild            1.1.0   2020-07-13 [1] CRAN (R 4.0.2)                    
   pkgconfig           2.0.3   2019-09-22 [1] CRAN (R 4.0.2)                    
   pkgload             1.1.0   2020-05-29 [1] CRAN (R 4.0.2)                    
   png                 0.1-7   2013-12-03 [1] CRAN (R 4.0.0)                    
   prettyunits         1.1.1   2020-01-24 [1] CRAN (R 4.0.2)                    
   processx            3.4.3   2020-07-05 [1] CRAN (R 4.0.2)                    
   proj4               1.0-10  2020-03-02 [1] CRAN (R 4.0.0)                    
   promises            1.1.1   2020-06-09 [1] CRAN (R 4.0.2)                    
   ps                  1.3.4   2020-08-11 [1] CRAN (R 4.0.2)                    
   ptolemy             1.0.2   2020-09-15 [1] Github (jmlondon/ptolemy@2215555) 
   purrr             * 0.3.4   2020-04-17 [1] CRAN (R 4.0.2)                    
   R6                  2.4.1   2019-11-12 [1] CRAN (R 4.0.2)                    
   raster              3.3-13  2020-07-17 [1] CRAN (R 4.0.2)                    
   RColorBrewer        1.1-2   2014-12-07 [1] CRAN (R 4.0.0)                    
   Rcpp                1.0.5   2020-07-06 [1] CRAN (R 4.0.2)                    
   readr             * 1.3.1   2018-12-21 [1] CRAN (R 4.0.2)                    
   readxl              1.3.1   2019-03-13 [1] CRAN (R 4.0.2)                    
   remotes             2.2.0   2020-07-21 [1] CRAN (R 4.0.2)                    
   reprex              0.3.0   2019-05-16 [1] CRAN (R 4.0.2)                    
   rgdal             * 1.5-16  2020-08-07 [1] CRAN (R 4.0.2)                    
   rlang               0.4.7   2020-07-09 [1] CRAN (R 4.0.2)                    
   rmarkdown           2.3     2020-06-18 [1] CRAN (R 4.0.2)                    
   rprojroot           1.3-2   2018-01-03 [1] CRAN (R 4.0.2)                    
   rstudioapi          0.11    2020-02-07 [1] CRAN (R 4.0.2)                    
   rvest               0.3.6   2020-07-25 [1] CRAN (R 4.0.2)                    
   satellite           1.0.2   2019-12-09 [1] CRAN (R 4.0.2)                    
   scales              1.1.1   2020-05-11 [1] CRAN (R 4.0.2)                    
   sessioninfo         1.1.1   2018-11-05 [1] CRAN (R 4.0.2)                    
   sf                * 0.9-5   2020-07-14 [1] CRAN (R 4.0.2)                    
   shiny               1.5.0   2020-06-23 [1] CRAN (R 4.0.2)                    
   sp                * 1.4-2   2020-05-20 [1] CRAN (R 4.0.2)                    
   stringi             1.4.6   2020-02-17 [1] CRAN (R 4.0.0)                    
   stringr           * 1.4.0   2019-02-10 [1] CRAN (R 4.0.2)                    
   svglite             1.2.3.2 2020-07-07 [1] CRAN (R 4.0.2)                    
   systemfonts         0.3.1   2020-09-08 [1] CRAN (R 4.0.2)                    
   testthat            2.3.2   2020-03-02 [1] CRAN (R 4.0.2)                    
   tibble            * 3.0.3   2020-07-10 [1] CRAN (R 4.0.2)                    
   tidyr             * 1.1.1   2020-07-31 [1] CRAN (R 4.0.2)                    
   tidyselect          1.1.0   2020-05-11 [1] CRAN (R 4.0.2)                    
   tidyverse         * 1.3.0   2019-11-21 [1] CRAN (R 4.0.2)                    
   tinytex             0.25    2020-07-24 [1] CRAN (R 4.0.2)                    
   units               0.6-7   2020-06-13 [1] CRAN (R 4.0.2)                    
   usethis           * 1.6.1   2020-04-29 [1] CRAN (R 4.0.2)                    
   uuid                0.1-4   2020-02-26 [1] CRAN (R 4.0.0)                    
   vctrs               0.3.2   2020-07-15 [1] CRAN (R 4.0.2)                    
   webshot             0.5.2   2019-11-22 [1] CRAN (R 4.0.2)                    
   withr               2.2.0   2020-04-20 [1] CRAN (R 4.0.2)                    
   xfun                0.16    2020-07-24 [1] CRAN (R 4.0.2)                    
   xml2                1.3.2   2020-04-23 [1] CRAN (R 4.0.2)                    
   xtable              1.8-4   2019-04-21 [1] CRAN (R 4.0.2)                    
   yaml                2.2.1   2020-02-01 [1] CRAN (R 4.0.2)                    

[1] C:/R-4.0.2/library

Any thoughts would be greatly appreciated, thanks in advance!

tim-salabim commented 4 years ago

Hi @makratofil I just pushed an update to leafpop last night, so things should work if you

remotes::install_github("r-spatial/leafpop")
makratofil commented 4 years ago

@tim-salabim works now, thanks!