downloadSpataObject: Download 'spata2' objects

downloadSpataObjectR Documentation

Download spata2 objects

Description

Downloads a spata object and returns it. For convenient downloads of multiple spata objects check out downloadSpataObjects().

Usage

downloadSpataObject(
  sample_name,
  overwrite = FALSE,
  folder = base::getwd(),
  file = NULL,
  in_shiny = FALSE,
  verbose = TRUE,
  ...
)

downloadSpataObjects(
  sample_names,
  files = NULL,
  folder = base::getwd(),
  overwrite = FALSE,
  in_shiny = FALSE,
  verbose = TRUE,
  ...
)

Arguments

sample_name

Character value. The name of the sample you want to download. Use validSampleNames() to obtain all valid input options.

overwrite

Logical. Must be set to TRUE if file directories under which downloaded files are about to be saved already exist.

folder

Character value. If character, specifies the output folder in which the spata object is saved. Defaults to the working directory.

file

The filename of the spata object. Must end with '.RDS'. By default the file it is 'NULL' which makes the function skip the saving step. Set to character, if you want the object to be saved.

verbose

Logical. If set to TRUE informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

...

Used to absorb deprecated arguments or functions.

sample_names

Character vector. The sample names of the spata objects to be downloaded. Use validSampleNames() to obtain all valid input options.

files

Character vector or NULL. Specifies the file names under which the spata objects are saved. If character, the input must be of the same length as the input for argument sample_names. If NULL, the files are named according to the sample name.

Value

The downloaded spata object.

Note

Imported from the package SPATAData.

Examples

# only download
downloadSpataObject(sample_name = "275_T", folder = getwd())

# download AND assign
object <- downloadSpataObject(sample_name = "275_T", folder = getwd())

# only assign (default)
object <- downloadSpataObject(sample_name = "275_T", file = NULL)

kueckelj/SPATA2 documentation built on March 16, 2024, 10:25 a.m.