Check if an object is an mcgf_rs
object..
mcgf_rs
object..is.mcgf_rs(x) as.mcgf_rs(x, label, ncores = 1)
x
: An Object.label
: A vector of regime labels. Its length must be the same as the number rows in data
.ncores
: Number of cpu cores used for computing in [ccfs()]
.is.mcgf_rs
returns a logical valud; TRUE if x
is of the mcgf_rs
class. as.mcgf_rs
coerces an mcgf
object to an mcgf_rs
object by adding regime labels. Fitted base or Lagrangian models in x
are kept.
data(sim2) is.mcgf_rs(sim2) sim2_mcgf <- mcgf(sim2$data, dists = sim2$dists) is.mcgf_rs(sim2_mcgf) sim2_mcgf <- mcgf_rs(sim2$data, dists = sim2$dists, label = sim2$label) is.mcgf_rs(sim2_mcgf) data(sim2) sim2_mcgf <- mcgf(sim2$data, dists = sim2$dists) sim2_mcgf <- as.mcgf_rs(sim2_mcgf, label = sim2$label)
Useful links