Add levels and labels to categorical or occasion covariate
addLabel.Rd
Allows users to specify the name and the associated value for each category/occasion of a categorical/occasion covariate in a textual model object. Only applicable to the case where the corresponding input data column of a categorical/occasion covariate is of class character.
Examples
# \donttest{
model <- pkmodel(columnMap = FALSE,
isPopulation = FALSE,
workingDir = tempdir())
model <- suppressWarnings(addCovariate(model,
covariate = "Gender",
type = "Categorical",
effect = c("V"),
levels = c(0, 1)))
model@isTextual <- TRUE
model <- addLabel(model, "Gender", c(1, 2), c("male", "female"))
# }