Forces the data in a NONMEM object to conform to the variable formats specified in the metadata.

Share:

Description

Forces the data in a NONMEM object to conform to the variable formats specified in the metadata. Users will be allowed to choose a subset of variables which should be formatted. Variables that are formatted should be coerced to factors, with the levels set as described by the comma separated string stored within the metadata.

Usage

1
imposeCategoryFormat(obj, varSubset, ...)

Arguments

obj

An object of class NMRun, NMBasicModel or data.frame

varSubset

The variables to be converted to factors. It can be a vector of variable names or a comma separated string

...

Additional arguments that apply to different classes. These are problemNum which specifies the required run for a NMRun object

Value

A new object with the required data coerced to factors of the correct form

Author(s)

Mango Solutions

Examples

1
2
x <- data.frame(SMOK = sample(0:1, 10, replace = TRUE), SEX = sample(1:2, 10, replace = TRUE))
print(imposeCategoryFormat(x))

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.