Learn R Programming

xpose4 (version 4.5.3)

xlabel: Extract and set labels for Xpose data items.

Description

This function extracts and sets label definitions in Xpose data objects.

Usage

xlabel(x, object)

xlabel(object) <- value

Arguments

x

Name of the variable to assign a label to.

object

An xpose.data object.

value

A two element vector of which the first element is the name of the variable and the second the label

Value

The label of the specified column.

Details

x should be a string exactly matching the name of a column in the data.frame in the Data slot of an xpose.data object. The name of columns defined through xpose variable definitions (see xpose.data) can be extracted using the xvardef function and to be used in the xlabel function, e.g. xlabel(xvardef("dv",object),object), which would give the label for the dv variable.

See Also

xpose.prefs-class, xvardef

Examples

Run this code

## xpdb5 is an Xpose data object
## We expect to find the required NONMEM run and table files for run
## 5 in the current working directory
xpdb5 <- xpose.data(5)

## Display label for dependent variable in the Xpose data object
xlabel(xvardef("dv", object), object)

## Set label for dependent variable
xlabel(xpdb5) <- c(xvardef("dv", object), "Concentration (mg/L)")

Run the code above in your browser using DataLab