export_ecm {ezECM} | R Documentation |
export_ecm()
saves an ECM model fit to training data for later use. The object can be the output of the cECM()
or BayesECM()
functions. Object saved in user specified location.
import_ecm()
loads a previously exported ECM model into the global environment.
export_ecm(x = NULL, file = stop("'file' must be specified"), verb = TRUE)
import_ecm(file = NULL, verb = TRUE)
x |
Name of ECM model to be exported. |
file |
Character string containing absolute or relative path of |
verb |
Logical indicating if a message indicating success should be printed to the console. |
Saves file or imports file into global environment.
x <- pval_gen(sims = 20, pwave.arrival = list(optim.starts = 5))
pval_cat <- cECM(x = x, transform = TRUE)
export_ecm(x = pval_cat, file = "example-ecm.rda", verb = FALSE)
reload_pval_cat <- import_ecm(file = "example-ecm.rda")
## The below code shouldn't be used,
## it deletes the file created during the example
unlink("example-ecm.rda")