Learn R Programming

⚠️There's a newer version (2.1.0) of this package.Take me there.

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:

To install the development version from GitHub:

install.packages("devtools") 
devtools::install_github("john-harrold/ubiquity",                                       
              force           = TRUE,
              build           = TRUE, 
              build_vignettes = TRUE,
              build_opts      = c("--no-resave-data", "--no-manual"))

Getting started

For full documentation go to 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: vignette("Simulation", package = "ubiquity")
  • 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 CHANGELOG.md for details on differences between updates.

Copy Link

Version

Install

install.packages('ubiquity')

Monthly Downloads

340

Version

1.0.5

License

BSD_2_clause + file LICENSE

Maintainer

John Harrold

Last Published

April 25th, 2021

Functions in ubiquity (1.0.5)

apply_sub_file_COV

Extracts Covariates for a Subject from a Subject Data File
generate_report

Generate Text Report with Estimation Results
logspace

Implementation of the logspace Function from Matlab
generate_parameter

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

Parse Prototype Functions for Arguments
generate_subject

Generate Subject
make_forcing_function

Makes Forcing Function From Times and Values
archive_estimation

Archive Estimation Results
calculate_objective

Calculates the Value of the Specified Objective Function
calculate_objective_ga

GA Wrapper for calculate_objective
gg_axis

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

Fetch System Parameters
system_clear_cohorts

Clear all Cohorts
system_define_cohort

Define Estimation Cohort
check_steady_state

Verify System Steady State
system_fetch_nca_columns

Columns in NCA Analysis
gg_log10_xaxis

Make Pretty ggplot x-Axis Log 10 Scale
system_fetch_set

Fetch Mathematical Set
estimate_parameters

Performs parameter estimation
fetch_full_parameters

Create Full Parameter Vector from Estimation Subset
md_to_officer

Parse Markdown for Officer
prepare_figure

Make ggplot Figure Pretty
system_fetch_template

Create New Analysis Template
parse_patterns

Parse String for Prototype Functions
system_nca_run

Automatic NCA
compare_estimate

Compares Estimate to Bounds
pad_string

Pad String with Spaces
linspace

Implementation of the linspace Function from Matlab
gg_log10_yaxis

Make Pretty ggplot y-Axis Log 10 Scale
nm_select_records

Select Records from NONMEM-ish Data Set
system_report_nca

Report NCA
system_nca_summary

Summarize NCA Results in Tabular Format
md_to_oo

Parse Markdown into Officer as_paragraph Result
system_report_slide_title

Generate Title Slide
system_report_ph_content

Populate Placeholder In Officer Report
system_report_slide_two_col

Generate Slide with Two Column Layout
sample_around

Define Sample Times Around Events
system_define_cohorts_nm

Define Cohorts from NONMEM Input File
system_estimate_parameters

Control Estimation Process
solution_statistics

Calculate Solution Statistics
system_set_tt_rate

Actual Function Called by SI_TT_RATE
system_simulate_estimation_results

Simulate Results at Estimates
run_simulation_ubiquity

Simulate Individual Response
run_simulation_titrate

Simulate With Titration or Rule-Based Inputs
system_fetch_TSsys

Fetch System Timescale
system_fetch_guess

Fetch Current Parameter Guesses
som_to_df

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

Run Population Simulations
vp

Print and Log Messages
var2string_gen

Convert R Objects to Strings
system_glp_save

Save results from a GLP Study design
system_glp_init

Initialize GLP study design
system_fetch_iiv

Fetch Variability Terms
system_fetch_report

Retrieve the officer Object of a Report
system_log_debug_save

Save variables to files
system_fetch_report_format

Fetch The Specified Report Formatting Information
system_log_entry

Add Log Entry
system_od_general

General Observation Details Function
system_report_slide_section

Generate Slide with Section Break
system_report_slide_content

Add Slide With Main Body of Content
system_plot_cohorts

Plot Estimation Results
system_report_doc_set_ph

Sets Placeholder Content for Word Document Report
system_fetch_nca

Fetch NCA Results
system_report_estimation

Generate a Report from Parameter Estimation
system_log_init

Initialize System Log File
system_nca_parameters_meta

List NCA parameters, text names and descriptions
system_report_view_layout

Generate Annotated Layout for Report Templates
system_check_requirements

Check For Perl and C Tools
system_check_steady_state

Verify System Steady State
system_req

Require Suggested Packages
system_report_doc_add_content

Add content to Body of a Word Document Report
system_report_doc_format_section

Formats the Current Document Section
workshop_fetch

Fetch Ubiquity Workshop Sections
system_new_tt_rule

Titration Rules
system_report_glp

Report GLP Study
system_report_init

Initialize a New Officer Report
system_set_covariate

Set Covariate Values
system_set_bolus

Set Bolus Inputs
system_select_set

Selecting Parameter Sets
system_set_guess

Alter Initial Guess and Parameter Bounds
system_nm_check_ds

Check NONMEM Dataset for Automatic Definitions
system_load_data

Loading Datasets
system_glp_scenario

Design GLP Study For a Scenario
system_zero_inputs

Zero All Model Inputs
system_new_list

Fetch List of Available System Templates
system_new

Create New system.txt File
system_report_save

Save Report to File
system_report_set

Overwrite officer Object for a Given Report
system_ts_to_simtime

Convert Time in Timescale to Simulation Time
system_view

View Information About the System
system_set_option

Setting Analysis Options
system_set_iiv

Set Variability Terms
system_set_rate

Set Infusion Rate Inputs
system_set_parameter

Set Value for Parameter
timecourse_stats

Calculate Timecourse Statistics for a Matrix of Responses
ubiquity_name_check

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

Actual Function Called by SI_TT_BOLUS
system_set_tt_cond

Define Titration Triggers and Actions
toc

Implementation of Matlab toc() command
tic

Implementation of Matlab tic() command
var2string

Converts Numeric Variables into Padded Strings
calculate_objective_pso

pso Wrapper for calculate_objective
calculate_variance

Calculates the Variance in od_general
AUC_Bailers_method

AUC for sparse data
GUI_log_entry

Wrapper for system_log_entry Used in ShinyApp
build_system

Building The System
calculate_halflife

Calculate the halflife of data