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")


MikeKSmith/rspeaksnonmem documentation built on March 12, 2023, 3:25 p.m.