R/export_jpeg.R

Defines functions export_jpeg

Documented in export_jpeg

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

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.