This method allows for updating an existing complr object.
Usage
# S3 method for class 'complr'
update(object, newdata, ...)Value
A complr object with at least the following elements.
XA vector of class
acomprepresenting one closed composition or a matrix of classacomprepresenting multiple closed compositions each in one row.bXA vector of class
acomprepresenting one closed between-person composition or a matrix of classacomprepresenting multiple closed between-person compositions each in one row.wXA vector of class
acomprepresenting one closed within-person composition or a matrix of classacomprepresenting multiple closed within-person compositions each in one row.ZLog ratio transform of composition.
bZLog ratio transform of between-person composition.
wZLog ratio transform of within-person composition.
dataThe user's dataset or imputed dataset if the iiut data contains zeros.
transformType of transform applied on compositional data.
partsNames of compositional variables.
idvarName of the variable containing IDs.
totalTotal amount to which the compositions is closed.
Examples
x <- complr(data = mcompd, sbp = sbp,
parts = c("TST", "WAKE", "MVPA", "LPA", "SB"), idvar = "ID")
# update with new data
newdat <- mcompd[ID != 1] # excluding ID 1
cilr1 <- update(object = x, newdata = newdat)
#> Error in complr(data = newdata, parts = parts, sbp = sbp, total = total, idvar = idvar, transform = transform): parts should be a character vector or a list of character vectors.