campsismod
must be installed beforehandrxode2
,
RxODE
or mrgsolve
)Install the latest stable release using devtools
:
::install_github("Calvagone/campsis") devtools
Import the campsis
package:
library(campsis)
Create your dataset:
<- Dataset(50) %>%
ds add(Bolus(time=0, amount=1000, ii=12, addl=2)) %>%
add(Observations(times=seq(0, 36, by=0.5)))
Load your own model or use a built-in model from the library:
<- model_library$advan4_trans4 model
Simulate your results with your preferred simulation engine
(rxode2
, RxODE
or mrgsolve
at
your choice!):
<- model %>% simulate(dataset=ds, dest="rxode2", seed=1) results
Plot your results:
shadedPlot(results, "CP")