ESQlabs R Resources
  1. Code template
  2. Get started with OSP Suite in R
  • Welcome
  • Good Practices
  • Guides
    • Style Guide
    • How to ask for help in R
    • Git and GitHub for collaboration
    • Advanced Topics
  • Code template
    • Get started with OSP Suite in R
    • Advanced Snippets
  • Troubleshooting
  • External Resources

On this page

  • Full Example Workflow 1
  • Edit this page
  • View source
  • Report an issue
  1. Code template
  2. Get started with OSP Suite in R

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.

Submit your snippet here โ†’

Full Example Workflow 1

Below is a concise example demonstrating loading, parameter modification, running, and visualizing:

library(ospsuite)

# Load simulation
simFilePath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
sim <- loadSimulation(simFilePath)

# Modify parameter
dose <- getParameter(path = "Applications|IV 250mg 10min|Application_1|ProtocolSchemaItem|Dose", sim)
setParameterValues(dose, 0.004)

# Run simulation
results <- runSimulations(sim)

# Visualize results
myDataCombined <- DataCombined$new()
myDataCombined$addSimulationResults(results[[1]])
plotIndividualTimeProfile(dataCombined = myDataCombined)

Back to top
Advanced Topics
Advanced Snippets

Copyright ESQlabs GmbH 2025.

 
  • Edit this page
  • View source
  • Report an issue