load_si_data: Load NBLAST supplemental data objects, downloading when...

View source: R/loading.R

load_si_dataR Documentation

Load NBLAST supplemental data objects, downloading when required

Description

load_si_data first checks to see if file must be downloaded from the jefferislab.org website (because it is missing or out of date). It then loads the file into the current R session.

Usage

load_si_data(
  data_name,
  type = c("auto", "data", "db", "bigmat", "ff", "plain"),
  overwrite = FALSE,
  ...
)

Arguments

data_name

the name of the file to load.

type

either auto, stating that the file should be handled automagically, plain, specifying that the file should just be downloaded, or the type of file (data, db, ff, or bigmat).

overwrite

whether to overwrite an existing file (default: FALSE). See fc_download_data.

...

extra arguments to pass to fc_download_data.

Details

Note that bigmat and ff objects will be loaded using the function fc_attach_bigmat.

Value

For rda files, a character vector of the names of objects created, invisibly or NULL if nothing loaded. For rds, bigmat or ff files, the object itself. Otherwise, the path to the downloaded file.

See Also

fc_download_data, fc_attach_bigmat

Examples

## Not run: 
mydata=load_si_data("mydata.rds")
# note that rda files are loaded into the global environment.
load_si_data("mydata.rda")
bigmat=load_si_data("data.desc")

## End(Not run)

# working example - P1 neuron clustering
p1df=load_si_data('p1df.rds')
table(p1df$cluster)


jefferis/flycircuit documentation built on Feb. 4, 2023, 6:04 p.m.