R/export_pdf.R

Defines functions export_pdf

Documented in export_pdf

export_pdf <-
function(map,chemin,nomFichier)
  {
  url <- gsub("\\\\", "/", tempfile(fileext = ".html"))
  
  htmlwidgets::saveWidget(widget = map,
                          file = url)
  
  webshot::webshot(url = url,
                   file = paste0(chemin,"/",nomFichier,".pdf"))
  }

Try the oceanis package in your browser

Any scripts or data that you put into this service are public.

oceanis documentation built on July 13, 2022, 5:06 p.m.