saveSpataObject: Save SPATA2 object with a default directory

View source: R/s.R

saveSpataObjectR Documentation

Save SPATA2 object with a default directory

Description

Saves the SPATA2 object under a default directory.

Usage

saveSpataObject(object, dir = NULL, verbose = NULL, ...)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

dir

Character value. The directory under which to store the SPATA2 object. If NULL, defaults to the directory set with setSpataDir().

verbose

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

(Warning messages will always be printed.)

...

Used to absorb deprecated arguments or functions.

Value

Apart from their side effect (saving the object of interest) all three functions return the provided, updated SPATA2 object.

See Also

setSpataDir(), getSpataDir()

Examples

library(SPATA2)

data("example_data")

object <- example_data$object_UKF269T_diet

getSpataDir(object) # fails, no directory set

# opt 1
object <- setSpataDir(object, directory_spata = "my_folder/object_UKF269T.RDS")

saveSpataObject(object)

# opt 2
object <- saveSpataObject(object, directory_spata = "my_folder/object_UKF269T.RDS")

getSpataDir(object)


theMILOlab/SPATA2 documentation built on Feb. 8, 2025, 11:41 p.m.