Download the registered GMR stacks for given ids
Source:R/vfb_stack_downloads.R
download_gmr_stacks.Rd
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
wrapping the
download.file
call in a try expression in case it failscaching 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
.
Examples
if (FALSE) { # \dontrun{
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")
} # }