library(ospsuite)
# Load simulation
<- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
simFilePath <- loadSimulation(simFilePath)
sim
# Modify parameter
<- getParameter(path = "Applications|IV 250mg 10min|Application_1|ProtocolSchemaItem|Dose", sim)
dose setParameterValues(dose, 0.004)
# Run simulation
<- runSimulations(sim)
results
# Visualize results
<- DataCombined$new()
myDataCombined $addSimulationResults(results[[1]])
myDataCombinedplotIndividualTimeProfile(dataCombined = myDataCombined)
Get started with OSP Suite in R
Submit new snippets
Got a clever R trick or elegant solution that made your day easier? Weโd love to see it! ๐
Share your favorite code snippets, helper functions, or workflow tips with the ESQlabs community. Whether itโs a data wrangling shortcut, a plotting hack, or a package discovery that changed your workflow - every contribution helps us all code smarter.
Full Example Workflow 1
Below is a concise example demonstrating loading, parameter modification, running, and visualizing: