set_vars: Set variable type, label or units

Description Usage Arguments Value Recognized variable types See Also Examples

Description

Function designed to change the type, label or unit associated with variables.

Usage

1
2
3
4
5
set_var_types(xpdb, .problem = NULL, ..., auto_factor = TRUE, quiet)

set_var_labels(xpdb, .problem = NULL, ..., quiet)

set_var_units(xpdb, .problem = NULL, ..., quiet)

Arguments

xpdb

An xpose_data object.

.problem

The problem number to which the edits will be applied.

...

Specifications of the edits to be made to the xpdb index. Edits are made as type and variable pairs e.g. idv = 'TAD' will assign TAD to the type idv (independent variable).

auto_factor

With set_var_types only. If TRUE new columns assigned to the type 'catcov' will be converted to factor.

quiet

Logical, if FALSE messages are printed to the console.

Value

An xpose_data object

Recognized variable types

See Also

list_vars

Examples

1
2
3
4
5
6
7
8
# Change variable type
xpdb_2 <- set_var_types(xpdb_ex_pk, .problem = 1, idv = 'TAD')

# Change labels
xpdb_2 <- set_var_labels(xpdb_2, .problem = 1, ALAG1 = 'Lag time', CL = 'Clearance', V = 'Volume')

# Change units
xpdb_2 <- set_var_units(xpdb_2, .problem = 1, ALAG1 = 'h', CL = 'L/h', V = 'L')

UUPharmacometrics/xpose documentation built on Jan. 21, 2019, 7:08 a.m.