View source: R/change.xvardef.R
change.xvardef | R Documentation |
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.
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
object |
An |
var |
The Xpose variable you would like to change or add to the current
object. A one-element character vector (e.g. |
def |
A vector of column names from NONMEM table files
( |
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 |
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).
change.xvardef(
object,
var,
listall = FALSE,
classic = FALSE,
check.var = FALSE,
...
) <- value
: Change the covariate scope of
the xpose database object
The default xpose variables are:
Individual identifier column in dataset
values used for plotting ID values on data points in plots
The occasion variable
The dv variable
The pred variable
The ipred variable
The wres variable
The cwres variable
The res variable
The parameters in the database
The covariates in the database
The random parameters in the database
Andrew Hooker
xvardef
, xpose.data
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.