Learn R Programming

Certara.RsNLME (version 3.1.0.1)

addLabel: Add levels and labels to categorical or occasion covariate

Description

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.

Usage

addLabel(.Object, covariate, levels, labels)

Value

Modified NlmePmlModel object

Arguments

.Object

Model object

covariate

Existing covariate name

levels

Unique values of categorical or occasion covariate column specified as numeric vector

labels

Unique values specifying corresponding label names for levels of categorical or occasion covariate column in data specified as character vector.

Examples

Run this code
# \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"))
# }

Run the code above in your browser using DataLab