try_download: downloads from a url to a local path, without breaking if it...

View source: R/try_download.R

try_downloadR Documentation

downloads from a url to a local path, without breaking if it fails

Description

try_download downloads from a URL to a local path. Often used for 'getting background stuff in bookdowns. Catches errors

Usage

try_download(url, path)

Examples

try_download(
"https://raw.githubusercontent.com/daaronr/dr-rstuff/master/functions/project_setup.R",
 here::here("code", "project_setup.R")
)


rethinkpriorities/rp-r-package documentation built on Jan. 7, 2023, 10:11 p.m.