Learn R Programming

ruminate

The goal of {ruminate} is to facilitate exploration of pharmacometrics data. This is done by creating a Shiny interface to different tools for data transformation ({dplyr} and {tidyr}), plotting ({ggplot2}), noncompartmental analysis ({PKNCA}), and ODE-based adaptive trial simulations ({rxode2}). These results can be reported in Excel, Word or PowerPoint. The state of the app can be saved and loaded at a later date. When saved, a script is generated to reproduce the different actions in the Shiny interface.

Deployed example in the cloud

You can point your web browser to runrumiate.ubiquity.tools and try the development version of ruminate. Keep in mind this is a public server. No data is tracked or kept, but it is open to the public. So be careful about uploading confidential data. Also know this is a single instance and if many people are using it at once it can be slow.

Local installation

From CRAN

You can install the released version of ruminate from CRAN with:

# Actual package
install.packages("ruminate",  dependencies=TRUE)

Development version

You can install the development version from GitHub with the following:

# Installing devtools if it's not already installed
if(system.file(package="devtools") == ""){
  install.packages("devtools") 
}

devtools::install_github("john-harrold/onbrand",   dependencies=TRUE)
devtools::install_github("john-harrold/formods",   dependencies=TRUE)
devtools::install_github("john-harrold/ruminate",  dependencies=TRUE)

Note that because {ruminate} depends on {formods} and {onbrand} you will need to first install the development versions of {onbrand} and {formods}.

Running ruminate

In RStudio

This will run the default/stable version of ruminate:

library(ruminate)
ruminate()

As new modules are developed they can be found in the development app. This command will run the ruminate with any development modules enabled:

library(ruminate)
library(shiny)
runApp(system.file(package="ruminate","templates", "ruminate_devel.R"))

If you are running this you should probably be using the development version off of github to make sure you have the latest version.

In a Docker container

This kind of assumes a basic familiarity with Docker. Keep in mind that these containers are built for ‘x86’ images. Essentially Intel/AMD cpus. This means that if you have a Mac with Apple Silicon (M1, M2,etc.) it may not work or the performance may not be that good.

Pull a container from Docker

This will pull container from docker and run it locally

docker pull johnmharrold/ruminate:latest
docker run -p 3838:3838   johnmharrold/ruminate:latest &

If that worked you can put the following into a web browser and then use ruminate there:

http://127.0.0.1:3838/

Create your own container

If you want to create your own container you can do the following:

docker build -t ruminate --no-cache  https://raw.githubusercontent.com/john-harrold/ruminate/main/inst/docker/local_container

This will run the Docker image locally:

docker run --name ruminate --rm -p 3838:3838 ruminate

If everything worked you can then point your web browser to:

http://127.0.0.1:3838/

This will push the image to DockerHub:

docker tag ruminate <username>/ruminate:latest
docker push <username>/ruminate:latest

You can use this to pull the image from DockerHub:

docker pull <username>/ruminate:latest

Deployment and Customization

If you want to deploy and customize ruminate, please see the Deployment vignette.

Copy Link

Version

Install

install.packages('ruminate')

Monthly Downloads

219

Version

0.3.2

License

BSD_2_clause + file LICENSE

Maintainer

John Harrold

Last Published

November 4th, 2025

Functions in ruminate (0.3.2)

CTS_fetch_code

Fetch Module Code
CTS_fetch_current_element

Fetches Current cohort
CTS_fetch_ds

Fetch Clinical Trial Simulator Module Datasets
CTS_fetch_sc_meta

Fetches Simulation Parameter Meta Information
CTS_fetch_state

Fetch Clinical Trial Simulator State
CTS_sim_isgood

Checks Simulation in Element for Goodness
CTS_simulate_element

Simulates the Specified Element
CTS_init_element_model

Initializes Cohort When Model Changes
CTS_init_state

Initialize CTS Module State
CTS_mk_preload

Make List of Current CTS State
MB_build_code

Build Code to Generate Model
MB_fetch_appends

Fetches List of Available Models
MB_fetch_catalog

Fetches List of Available Models
CTS_update_checksum

Updates CTS Module Checksum
CTS_test_mksession

Populate Session Data for Module Testing
CTS_change_source_model

Change the Source Model
CTS_del_current_element

Deletes Current cohort
CTS_new_element

New Clinical Trial Simulation Cohort
NCA_Server

Fetch Non-Compartmental Analysis State
MB_fetch_mdl

Fetch Model Builder Module Models
NCA_add_int

Adds Analysis Interval to Current Analysis
MB_fetch_current_element

Fetches Current model
MB_Server

Model Builder State Server
MB_update_checksum

Update MB Module Checksum
MB_preload

Preload Data for MB Module
MB_set_current_element

Sets the Value for the Current model
MB_append_report

Append Report Elements
CTS_preload

Preload Data for CTS Module
MB_del_current_element

Deletes Current model
CTS_set_current_element

Sets the Value for the Current cohort
MB_mk_preload

Make List of Current MB State
NCA_append_report

Append Report Elements
NCA_fetch_PKNCA_meta

Fetches PKNCA Metadata
CTS_plot_element

Plots the Specified Element
NCA_fetch_ds

Fetch Module Datasets
MB_test_catalog

Tests the Model Catalog
NCA_load_scenario

Loads Pre-Defined Scenario
NCA_fetch_current_ana

Fetches Current Analysis
NCA_fetch_code

Fetch Module Code
NCA_init_state

Initialize NCA Module State
MB_new_element

New Model Building Model
MB_fetch_component

Fetch Selected Current Model Component
MB_fetch_code

Fetch Module Code
MB_init_state

Initialize MB Module State
MB_fetch_state

Fetch Model Builder State
NCA_fetch_state

Fetch ruminate State
MB_test_mksession

Populate Session Data for Module Testing
mk_table_ind_obs

Creates Tables of Individual Observations from PKNCA Result
MB_update_model

Updates Current Element with rxode2 Model
mk_table_nca_params

Create Tabular Output from PKNCA Results
NCA_fetch_current_obj

Fetches the Current Analysis Object
NCA_fetch_data_format

Fetches Details About Data Requirements
apply_route_map

Applies Route Mapping to Dataset
nca_builder

Builds NCA Code from ui Elements
NCA_test_mksession

Populate Session Data for Module Testing
plot_sr_ev

Plots Timecourse of Rules Simulations
NCA_fetch_np_meta

Fetches NCA Parameter Meta Information
NCA_mk_preload

Make List of Current NCA State
NCA_new_ana

Initialize New Analysis
NCA_preload

Preload Data for NCA Module
ruminate

ruminate: Shiny app and module to facilitate pharamacometrics analysis
fetch_rxinfo

Fetches Information from an rxode2 Object
NCA_find_col

Determines Default Column Name
plot_sr_tc

Plots Timecourse of Rules Simulations
dose_records_builder

Builds Dose Records Dataframe
mk_figure_ind_obs

Creates Figures of Individual Observations from PKNCA Result
ruminate_check

Checks ruminate Dependencies
NCA_mkactive_ana

Fetch PKNCA Results Object
fetch_rxtc

Extracts Timecourse and Merges Covariates
run_nca_components

Runs NCA for the Current Analysis
NCA_fetch_ana_ds

Fetch Analysis Dataset
NCA_process_current_ana

Processes Current Analysis to be Run
mk_subjects

Fetches Information from an rxode2 Object
rx2other

Converts an rxode2 Object Into Specified Model Format
NCA_set_current_ana

Sets Current Analysis
NCA_fetch_ana_pknca

Fetch PKNCA Results Object
mk_rx_obj

Makes an rxode2 Object
simulate_rules

Rule-Based simulates
CTS_Server

Clinical Trial Simulator State Server
CTS_add_rule

Add Rule to Element
CTS_add_covariate

Add Covariate to Elemetnt
CTS_append_report

Append Report Elements