Load a remote R binary file. This function is vectorized and supports multiple URLs in a single call.

loadRemoteData(
  url,
  envir = globalenv(),
  overwrite = getOption("acid.overwrite", default = TRUE)
)

Arguments

url

character. Remote URL file path(s) to R data.

envir

environment. Environment.

overwrite

logical(1). Overwrite existing file on disk.

Value

Invisible named character. Local object name as the name, and the remote URL as the value.

Note

Updated 2020-01-19.

Examples

url <- AcidBase::pasteURL( pipetteTestsURL, "rnaseq_counts.rds", protocol = "none" ) print(url)
#> [1] "https://r.acidgenomics.com/testdata/pipette/v0.5/rnaseq_counts.rds"
x <- loadRemoteData(url)
#> → Downloading <https://r.acidgenomics.com/testdata/pipette/v0.5/rnaseq_counts.rds> to /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpNWByJh/pipette-131e5d6758b8.rds.
#> → Importing rnaseq_counts.rds at https://r.acidgenomics.com/testdata/pipette/v0.5 using base::`readRDS()`.
print(x)
#> rnaseq_counts #> "https://r.acidgenomics.com/testdata/pipette/v0.5/rnaseq_counts.rds"