rxRename {rxode2} | R Documentation |
Rename items inside of a rxode2
ui model
Description
rxRename()
changes the names of individual variables, lhs, and ode states using
new_name = old_name
syntax
Usage
rxRename(.data, ..., envir = parent.frame())
.rxRename(.data, ..., envir = parent.frame())
rename.rxUi(.data, ...)
rename.function(.data, ...)
## S3 method for class 'rxUi'
rxRename(.data, ...)
## S3 method for class ''function''
rxRename(.data, ...)
## Default S3 method:
rxRename(.data, ...)
Arguments
.data |
rxode2 ui function, named data to be consistent with |
... |
rename items |
envir |
Environment for evaluation |
Details
This is similar to dplyr
's rename()
function. When dplyr
is
loaded, the s3
methods work for the ui objects.
Note that the .rxRename()
is the internal function that is called
when renaming and is likely not what you need to call unless you
are writing your own extension of the function
Value
New model with items renamed
Author(s)
Matthew L. Fidler
Examples
ocmt <- function() {
ini({
tka <- exp(0.45) # Ka
tcl <- exp(1) # Cl
## This works with interactive models
## You may also label the preceding line with label("label text")
tv <- exp(3.45) # log V
## the label("Label name") works with all models
add.sd <- 0.7
})
model({
ka <- tka
cl <- tcl
v <- tv
d/dt(depot) = -ka * depot
d/dt(center) = ka * depot - cl / v * center
cp = center / v
cp ~ add(add.sd)
})
}
ocmt %>% rxRename(cpParent=cp)
[Package rxode2 version 2.1.3 Index]