knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(rspeaksnonmem)
library(reticulate) conda_create("r-rspeaksnonmem") conda_install("r-rspeaksnonmem", "pharmpy-core", pip = TRUE)
library(reticulate) use_condaenv("r-rspeaksnonmem") pharmpy <- import("pharmpy")
model <- pharmpy$Model(system.file("extdata","warfarin.ctl", package="rspeaksnonmem")) model$parameters
params <- model$parameters params$inits <- list('THETA(1)'=2) # set initial estimate of THETA(1) to 2 model$parameters <- params model$parameters
model$write(path = "warfarin_updated.ctl")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.