update.complr {multilevelcoda} | R Documentation |
Update complr
Description
This method allows for updating an existing complr
object.
Usage
## S3 method for class 'complr'
update(object, newdata, ...)
Arguments
object |
A |
newdata |
A |
... |
generic argument, not in use. |
Value
A complr
object with at least the following elements.
comp |
A vector of class |
between_comp |
A vector of class |
within_comp |
A vector of class |
logratio |
Log ratio transform of composition. |
between_logratio |
Log ratio transform of between-person composition. |
within_logratio |
Log ratio transform of within-person composition. |
data |
The user's dataset or imputed dataset if the input data contains zeros. |
transform |
Type of transform applied on compositional data. |
parts |
Names of compositional variables. |
idvar |
Name of the variable containing IDs. |
total |
Total amount to which the compositions is closed. |
See Also
Examples
cilr <- 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 = cilr, newdata = newdat)