Learn R Programming

rxode2 (version 2.0.7)

rxRename: 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())

rename.rxUi(.data, ...)

rename.function(.data, ...)

Arguments

.data

rxode2 ui function, named data to be consistent with dplyr::rename()

...

rename items

envir

Environment for evaluation

Value

New model with items renamed

Examples

Run this code
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab