inst/doc/export-model.R

## ----load-lib, echo=FALSE-----------------------------------------------------
library(PKPDsim)

## ----export-example, eval = FALSE---------------------------------------------
#  p <- list(CL = 5, V = 50)
#  reg <- new_regimen (amt = 100, n = 4, interval = 12, type = "bolus",  cmt=1)
#  
#  new_ode_model(
#    code = "
#      dAdt[1] = -(CL/V) * A[1]
#    ",
#    dose = list(cmt = 1, bioav = 1),
#    obs = list(cmt = 1, scale = "V"),
#    parameters = p,
#    package = "pktest",
#    install = TRUE
#  )

## ----load-library, eval=F-----------------------------------------------------
#  library(pktest)
#  mod <- pktest::model()

## ----simulate, eval=F---------------------------------------------------------
#  sim(
#    ode = mod,
#    parameters = p,
#    regimen = reg
#  )

Try the PKPDsim package in your browser

Any scripts or data that you put into this service are public.

PKPDsim documentation built on March 7, 2023, 5:40 p.m.