change.xvardef: Change Xpose variable definitions.

Description Usage Arguments Value Functions Additional arguments Author(s) See Also Examples

View source: R/change.xvardef.R

Description

These functions allow for the changing of Xpose variable definitions like "idv" and "dv". These variable definitions are used to refer to columns of the observed data in a generic way, so that generic plotting functions can be created.

Usage

1
2
3
4
5
change.xvardef(object, var = ".ask", def = ".ask", listall = TRUE,
  classic = FALSE, check.var = FALSE, ...)

change.xvardef(object, var, listall = FALSE, classic = FALSE,
  check.var = FALSE, ...) <- value

Arguments

object

An xpose.data object.

var

The Xpose variable you would like to change or add to the current object. A one-element character vector (e.g. "idv"). If ".ask" the user will be prompted to input a value.

def

A vector of column names from NONMEM table files (names([email protected])) that should be associated with this variable (e.g. c("TIME")). Multiple values are allowed. If ".ask" the user will be prompted to input values.

listall

Should the function list the database values?

classic

Is the function being used from the classic interface. This is an internal option.

check.var

Should the variables be checked against the current variables in the object?

...

Items passed to functions within this function.

value

a vector of values

Value

If called from the the command line then this function returns an xpose database. If called from the classic interface this function updates the current xpose database (.cur.db).

Functions

Additional arguments

The default xpose variables are:

id

Individual identifier column in dataset

idlab

values used for plotting ID values on data points in plots

occ

The occasion variable

dv

The dv variable

pred

The pred variable

ipred

The ipred variable

wres

The wres variable

cwres

The cwres variable

res

The res variable

parms

The parameters in the database

covariates

The covariates in the database

ranpar

The random parameters in the database

Author(s)

Andrew Hooker

See Also

xvardef, xpose.data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Here we load the example xpose database 
xpdb <- simpraz.xpdb

# Change the "id" variable to point to "PRED" in the xpose object
xpdb <- change.xvardef(xpdb,var="id",def="PRED")

# Check the value of the "id" variable
xvardef("id",xpdb)

# Change the "idv" variable
change.xvardef(xpdb,var="idv") <- "TIME"

# Change the covariate scope
change.xvardef(xpdb,var="covariates") <- c("SEX","AGE","WT")

## Not run: 
# Use the interactive capabilities of the function
xpdb <- change.xvardef(xpdb)

## End(Not run)

UUPharmacometrics/xpose4 documentation built on April 3, 2018, 12:05 p.m.