View source: R/param-manipulate.R
add_mixed_param | R Documentation |
Primarily an internal function. This will (by default) add a parameter (mixed effect) to your code $PK/$PRED and $THETA/$OMEGA.
add_mixed_param(
m,
name,
init = 1,
unit = "",
trans = c("LOG"),
position = NA_integer_,
after = character()
)
m |
An nm object. |
name |
Character. Name of NONMEM variable to create. |
init |
Numeric (default = |
unit |
Character (default = |
trans |
Character (default = |
position |
Integer. Not used. |
after |
Character. Pattern to match and include the mixed effect after. |
An nm object with modified ctl_contents
field.
# create example object m1 from package demo files
exdir <- system.file("extdata", "examples", "theopp", package = "NMproject")
m1 <- new_nm(run_id = "m1",
based_on = file.path(exdir, "Models", "ADVAN2.mod"),
data_path = file.path(exdir, "SourceData", "THEOPP.csv"))
m1 %>% dollar("PK")
m1 %>% dollar("THETA")
m1 <- m1 %>% add_mixed_param("ALAG1", init = 1.1, unit = "h", trans = "LOG")
m1 %>% dollar("PK")
m1 %>% dollar("THETA")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.