Learn R Programming

pharmr (version 2.2.0)

annotate_unit: annotate_unit

Description

Specify the unit of a data column

Note that no conversion of units will happen if the unit was already set.

Usage

annotate_unit(model_or_datainfo, column, unit)

Value

(Model | DataInfo) An updated Model or DataInfo object

Arguments

model_or_datainfo

(Model or DataInfo) Model object or DataInfo object

column

(str) Name of a column. If the column contains multiple variables, e.g. DV with multiple DVs, the ID can be specified with a colon. For example "DV:1" will mean the DV column only when DVID is 1.

unit

(str) The unit

See Also

convert_unit - Convert between units for a variable

Examples

Run this code
if (FALSE) {
model <- load_example_model("pheno")
model <- annotate_unit(model, "WGT", "kg")
}

Run the code above in your browser using DataLab