download_gmr_stacks: Download the registered GMR stacks for given ids

View source: R/vfb_stack_downloads.R

download_gmr_stacksR Documentation

Download the registered GMR stacks for given ids

Description

Download the registered GMR stacks for given ids

Usage

download_gmr_stacks(
  ids,
  download.dir = getOption("vfbr.stack.downloads"),
  Force = FALSE,
  ...
)

Arguments

ids

Character vector of GMR ids specified in any way

download.dir

The download directory

Force

Whether to force the download.

...

Additional arguments passed to download.file

Details

Note that the downloading tries to be a little bit clever, by

  1. wrapping the download.file call in a try expression in case it fails

  2. caching the download.file call so if the destination file already exists it will not re-download the file.

If caching gives you unexpected behaviour, you can set Force=TRUE.

Value

Named character vector of paths to downloaded files

See Also

gmr_stack_urls_for_ids

Examples

## Not run: 
stacks=download_gmr_stacks(c('9A09', '95H11'))
stacks

# on Mac and Windows systems, this will open in the default application
# e.g. Fiji/ImageJ if you have associated ".nrrd" files
open_stack<-function(x) system(paste("open", paste(shQuote(x), collapse = " ")))
open_stack(stacks)

# open the downloads directory in the Finder/Windows Explorer
open_stack(getOption('vfbr.stack.downloads'))

# Set the package option to control where files are downloaded
# see also ?vfbr
option(vfbr.stack.downloads="/path/to/my/stacks/folder")

## End(Not run)

jefferis/vfbr documentation built on Sept. 24, 2024, 1:37 p.m.