Learn R Programming

ubiquity R Workflow

Overview

Provides an interface to the R workflow for ubiquity: a set of modeling tools created to accelerate the development and deployment of models of drug disposition and efficacy within an organization or institution. It is designed to make model development easier, reduce the pain when moving between modeling software, and provide a simple but customizable interface to allow other scientists to interrogate models. It is provide free under a BSD license with source code available in GitHub (R-package, ubiquity project).

Installing ubiquity

For detailed software requirements and installation instructions see this page: (https://ubiquity.tools/rworkflow)

Briefly, install the following:

Then you can install ubiquity from CRAN

install.packages("ubiquity", dependencies=TRUE) 

Or install the development version from GitHub:

Note you may need to install the development version of onbrand from GitHub as well

# Installing devtools if it's not already installed
if(system.file(package="devtools") == ""){
  install.packages("devtools") 
}
devtools::install_github("john-harrold/ubiquity", dependencies=TRUE)

Getting started

For full documentation the ubiquity vignettes and manuals are available.

For more information on specific tasks see the following vignettes:

  • Language: Constructing ODE-based systems using the ubiquity language
  • Simulation: Running individual and population simulations
  • Estimation: Naive-pooled parameter estimation
  • Titration: Rule-based/titration simulations
  • Deployment: ShinyApp for running and deploying models
  • Reporting: Inline generation of PowerPoint and Word reports
  • NCA:

Automated non-compartmental analysis with PKNCA

Changes and Updates

See the NEWS.md for details on differences between updates.

Copy Link

Version

Install

install.packages('ubiquity')

Monthly Downloads

282

Version

2.1.0

License

BSD_2_clause + file LICENSE

Maintainer

John Harrold

Last Published

January 7th, 2025

Functions in ubiquity (2.1.0)

gg_axis

Make Pretty ggplot x- or y-Axis Log 10 Scale
generate_report

Generate Text Report with Estimation Results
logspace

Implementation of the logspace Function from Matlab
system_check_requirements

Check For Perl and C Tools
system_check_steady_state

Verify System Steady State
make_forcing_function

Makes Forcing Function From Times and Values
run_simulation_titrate

Simulate With Titration or Rule-Based Inputs
generate_subject

Generate Subject
estimate_parameters

Performs parameter estimation
fetch_full_parameters

Create Full Parameter Vector from Estimation Subset
GUI_log_entry

Wrapper for system_log_entry Used in ShinyApp
parse_patterns

Parse String for Prototype Functions
system_fetch_TSsys

Fetch System Timescale
prepare_figure

Make ggplot Figure Pretty
system_fetch_guess

Fetch Current Parameter Guesses
system_clear_cohorts

Clear all Cohorts
system_fetch_iiv

Fetch Variability Terms
system_fetch_nca

Fetch NCA Results
nm_select_records

Select Records from NONMEM-ish Data Set
gg_log10_xaxis

Make Pretty ggplot x-Axis Log 10 Scale
run_simulation_ubiquity

Simulate Individual Response
system_define_cohort

Define Estimation Cohort
system_log_debug_save

Save variables to files
system_load_data

Loading Datasets
pad_string

Pad String with Spaces
simulate_subjects

Run Population Simulations
sample_around

Define Sample Times Around Events
system_fetch_set

Fetch Mathematical Set
system_nca_parameters_meta

List NCA parameters, text names and descriptions
check_steady_state

Verify System Steady State
system_rpt_estimation

Generate a Report from Parameter Estimation
system_rpt_nca

Report NCA
system_new

Create New system.txt File
system_nca_summary

Summarize NCA Results in Tabular Format
system_nca_run

Automatic NCA
system_req

Require Suggested Packages
system_plot_cohorts

Plot Estimation Results
system_rpt_save_report

Save Report to a File
system_define_cohorts_nm

Define Cohorts from NONMEM Input File
system_rpt_add_slide

Add Slide to a Powerpoint Report
system_rpt_add_doc_content

Adds Content to a Word Report
compare_estimate

Compares Estimate to Bounds
system_rpt_read_template

Initialize a New Report
system_estimate_parameters

Control Estimation Process
system_set_rate

Set Infusion Rate Inputs
system_set_tt_rate

Actual Function Called by SI_TT_RATE
timecourse_stats

Calculate Timecourse Statistics for a Matrix of Responses
tic

Implementation of Matlab tic() command
system_set_rpt_officer_object

Sets the officer Object for the Specified ubiquity Report
system_set_tt_cond

Define Titration Triggers and Actions
system_fetch_nca_columns

Columns in NCA Analysis
system_new_list

Fetch List of Available System Templates
system_new_tt_rule

Titration Rules
system_fetch_parameters

Fetch System Parameters
system_set_iiv

Set Variability Terms
system_set_guess

Alter Initial Guess and Parameter Bounds
system_simulate_estimation_results

Simulate Results at Estimates
system_set_bolus

Set Bolus Inputs
system_set_rpt_onbrand_object

Sets the onbrand Object for the Specified ubiquity Report
system_set_covariate

Set Covariate Values
system_fetch_template

Create New Analysis Template
system_glp_scenario

Design GLP Study For a Scenario
system_glp_init

Initialize GLP study design
gg_log10_yaxis

Make Pretty ggplot y-Axis Log 10 Scale
som_to_df

Converts the Wide/Verbose Output Simulation Functions into Data Frames
linspace

Implementation of the linspace Function from Matlab
solution_statistics

Calculate Solution Statistics
system_fetch_rpt_officer_object

Extracts the officer Object From the Specified ubiquity Report
system_fetch_rpt_onbrand_object

Extracts the onbrand Object From the Specified ubiquity Report
system_log_entry

Add Log Entry
system_set_option

Setting Analysis Options
system_log_init

Initialize System Log File
system_nm_check_ds

Check NONMEM Dataset for Automatic Definitions
system_view

View Information About the System
system_set_parameter

Set Value for Parameter
var2string_gen

Convert R Objects to Strings
var2string

Converts Numeric Variables into Padded Strings
system_set_tt_bolus

Actual Function Called by SI_TT_BOLUS
system_zero_inputs

Zero All Model Inputs
system_od_general

General Observation Details Function
system_rpt_template_details

Generate Details about Report Template
system_select_set

Selecting Parameter Sets
system_ts_to_simtime

Convert Time in Timescale to Simulation Time
vp

Print and Log Messages
toc

Implementation of Matlab toc() command
ubiquity_name_check

Check Names of Cohorts, Analyses, Reports, etc.
workshop_fetch

Fetch Ubiquity Workshop Sections
calculate_halflife

Calculate the halflife of data
build_system

Build the System File
calculate_objective_ga

GA Wrapper for calculate_objective
calculate_objective

Calculates the Value of the Specified Objective Function
apply_sub_file_COV

Extracts Covariates for a Subject from a Subject Data File
archive_estimation

Archive Estimation Results
AUC_Bailers_method

Calculate AUC for Sparse Data
calculate_objective_pso

pso Wrapper for calculate_objective
calculate_variance

Calculates the Variance in od_general
find_bracketed_arguments

Parse Prototype Functions for Arguments
generate_parameter

Generates a Parameter Based on <IIV:?> in the System File