R/export_png.R

Defines functions export_png

Documented in export_png

export_png <-
function(map,chemin,nomFichier)
  {
  url <- gsub("\\\\", "/", tempfile(fileext = ".html"))
  
  htmlwidgets::saveWidget(widget = map,
                          file = url)
  
  webshot::webshot(url = url,
                   file = paste0(chemin,"/",nomFichier,".png"))
  }
insee-psar-at/oceanis-package documentation built on Feb. 1, 2025, 9:20 a.m.