Skip to main content
Skip table of contents

Getting Started with gastroPlusAPI and gastroPlusModuLens R Packages

Introduction

This document details the steps for getting started interacting with the GastroPlus Orchestrator Service from R. It walks through installing R, RStudio, installing gastroPlusAPI and gastroPlusRModuLens packages and executing example scripts available with the GastroPlus installation.

The document also assumes that GastroPlus 10.2 or later version is installed and licensed.

gastroPlusAPI

The gastroPlusAPI package expose a comprehensive list of functionalities of gastroPlus engine to be accessible in the R ecosystem.

gastroPlusRModuLens

The gastroPlusModuLens package offers user-friendly functions and utilities that streamline common use-cases and requirements for plotting and visualization

Requirements

To follow along you will need:

  • GastroPlus 10.2 or later installed and licensed.

  • R ≥ 4.1

  • RStudio ≥ 2024.12.0+467

R and RStudio can be installed fromhttps://posit.co/download/rstudio-desktop/.

Install gastroPlusAPI and gastroPlusRModuLens packages

After installing GastroPlus 10.2,

the gastroPlusAPI and gastroPlusRModuLens packages will reside in the following location

C:/ProgramData/Simulations Plus, Inc/GastroPlusOrchestrator/10.2/R/gastroPlusAPI_10.2.0.tar.gz

C:/ProgramData/Simulations Plus, Inc/GastroPlusOrchestrator/10.2/R/gastroPlusRModuLens.10.2.0.tar.gz

To install the R packages, please perform the following steps

  1. Open RStudio

  2. In the Console tab, install the “remotes” package

    R
    install.packages("remotes")
  3. Install gastroPlusAPI package

    R
    remotes::install_local("C:/ProgramData/Simulations Plus, Inc/GastroPlusOrchestrator/10.2/R/gastroPlusAPI_10.2.0.tar.gz")
  4. Install gastroPlusRModuLens package

    R
    remotes::install_local("C:/ProgramData/Simulations Plus, Inc/GastroPlusOrchestrator/10.2/R/gastroPlusRModulens_10.2.0.tar.gz")

Execute an example script

After installing GastroPlus 10.2, the example R scripts are available in the following location.
C:/ProgramData/Simulations Plus, Inc/GastroPlusOrchestrator/10.2/R/ExampleScripts

Please note that these scripts require the project files located in
C:/ProgramData/Simulations Plus, Inc/GastroPlusOrchestrator/10.2/ProjectFiles

Copy the above mentioned folders to your working directly so that you can freely modify them

Once the R packages are installed, user can open one of the .Rmd files in RStudio and execute individual code chunks or the entire script.

The code chunks of these example scripts with the corresponding outputs can be found in the following location:
Example R GastroPlusAPI Scripts

Recommended ecosystem of R packages

It is strongly recommended that user installs the following packages for a more user-friendly scripting experience

  • tidyverse

In the case of specific workflows, the following packages would be recommended for installations:

  • corrplot (visualization for PSA workflow)

  • DT (to display tables in R markdown: ADMET Predictor workflow)

  • kableExtra (ADMET Predictor workflow)

  • knitr (all R markdown)

  • plotly (PSA workflow)

  • sensitivity (GSA workflow)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.