download_opt_data: Download optional data for the freesurferformats package.

View source: R/optdata.R

download_opt_dataR Documentation

Download optional data for the freesurferformats package.

Description

Ensure that the optional data is available locally in the package cache. Will try to download the data only if it is not available. This data is not required for the package to work, but it is used in the examples, in the unit tests and also in the example code from the vignette. Downloading it is highly recommended.

Usage

download_opt_data(
  dl_from = c("rcmd.org", "github_fsf_release"),
  scheme = c("https", "http")
)

Arguments

dl_from

string, the source to download from. Either '"rcmd.org"' (the default) or '"github_fsf_release"' to use the GitHub release at https://github.com/dfsp-spirit/freesurferformats/releases/tag/nitestdata-v1.

scheme

string, the URL scheme to use. Either '"https"' (the default) or '"http"'. Both the rcmd.org server and GitHub support HTTPS, so this should rarely need to be changed.

Value

Named list. The list has entries: "available": vector of strings. The names of the files that are available in the local file cache. You can access them using get_optional_data_file(). "missing": vector of strings. The names of the files that this function was unable to retrieve.


freesurferformats documentation built on July 8, 2026, 5:08 p.m.