cran / mdsr

:exclamation: This is a read-only mirror of the CRAN R package repository. mdsr — Complement to 'Modern Data Science with R'. Homepage: https://github.com/mdsr-book/mdsr Report bugs for this package: https://github.com/mdsr-book/mdsr/issues
0 stars 1 forks source link

Issue with save_webshot() #1

Open georgechaide opened 6 months ago

georgechaide commented 6 months ago

Note that the overwirte argument is ignored:

mdsr:: save_webshot
function (map, path_to_img, overwrite = FALSE, vwidth = 800, 
    vheight = 600, cliprect = "viewport", ...) 
{
    out <- fs::as_fs_path(path_to_img)
    if (!fs::path_ext(out) == ".png") {
        out <- fs::path_ext_set(out, ".png")
    }
    if (fs::file_exists(out)) {
        warning("file exists already")
    }
    tmp_file <- fs::file_temp(ext = ".html")
    map %>% htmlwidgets::saveWidget(file = tmp_file, selfcontained = FALSE)
    suppressWarnings(webshot2::webshot(tmp_file, file = out, 
        vwidth = vwidth, vheight = vheight, cliprect = cliprect, 
        ...))
    return(out)
}
gaborcsardi commented 6 months ago

Hi, this is a read only mirror of CRAN, please see the package authors in the DESCRIPTION file. Look for Maintainer, BugReports and URL. Thanks!

nicholasjhorton commented 6 months ago

Apologies: that was my error. I will do exactly that.