saveSpataObject.Rd
Saves the SPATA2
object under a default directory.
saveSpataObject(object, dir = NULL, verbose = NULL, ...)
An object of class SPATA2
or, in case of S4 generics,
objects of classes for which a method has been defined.
Character value. The directory under which to store
the SPATA2
object. If NULL
, defaults to the directory set with setSpataDir()
.
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.
Apart from their side effect (saving the object of interest) all three functions
return the provided, updated SPATA2
object.
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)