Learn R Programming

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

ubiquity

Information

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 more information on specific tasks see the vignettes:

  • Constructing ODE based systems using the ubiquity language: vignette("Language", package = "ubiquity")
  • Running individual and population simulations: vignette("Simulation", package = "ubiquity")
  • Naive-pooled parameter estimation: vignette("Estimation", package = "ubiquity")
  • Rule-based/titration simulations: vignette("Titration", package = "ubiquity")
  • ShinyApp for running and deploying models: vignette("Deployment", package = "ubiquity")
  • Inline generation of PowerPoint and Word reports: vignette("Reporting", package = "ubiquity")
  • Automated non-compartmental analysis with PKNCA: vignette("NCA", package = "ubiquity")

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.3

License

BSD_2_clause + file LICENSE

Maintainer

John Harrold

Last Published

September 13th, 2020

Functions in ubiquity (1.0.3)

generate_report

Generate Text Report with Estimation Results
gg_log10_xaxis

Make Pretty ggplot x-Axis Log 10 Scale
gg_axis

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

Parse String for Prototype Functions
pad_string

Pad String with Spaces
md_to_officer

Parse Markdown for OfficeR
calculate_halflife

Calculate the halflife of data
system_define_cohort

Define Estimation Cohort
fetch_full_parameters

Create Full Parameter Vector from Estimation Subset
estimate_parameters

Performs parameter estimation
find_bracketed_arguments

Parse Prototype Functions for Arguments
nm_select_records

Select Records from NONMEM-ish Data Set
check_steady_state

Verify System Steady State
generate_parameter

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

Compares Estimate to Bounds
system_plot_cohorts

Plot Estimation Results
system_fetch_guess

Fetch Current Parameter Guesses
solution_statistics

Calculate Solution Statistics
simulate_subjects

Run Population Simulations
system_nca_run

Automatic NCA
logspace

Implementation of the logspace Function from Matlab
run_simulation_ubiquity

Simulate Individual Response
run_simulation_titrate

Simulate With Titration or Rule-Based Inputs
prepare_figure

Make ggplot Figure Pretty
gg_log10_yaxis

Make Pretty ggplot y-Axis Log 10 Scale
make_forcing_function

Makes Forcing Function From Times and Values
system_define_cohorts_nm

Define Cohorts from NONMEM Input File
system_new

Create New system.txt File
generate_subject

Generate Subject
system_fetch_iiv

Fetch Variability Terms
system_log_entry

Add Log Entry
system_report_fetch

Retrieve the officer Object of a Report
system_report_estimation

Generate a Report from Parameter Estimation
system_report_view_layout

Generate Annotated Layout for Report Templates
system_check_steady_state

Verify System Steady State
system_report_doc_add_content

Add content to Body of a Word Document Report
linspace

Implementation of the linspace Function from Matlab
system_clear_cohorts

Clear all Cohorts
som_to_df

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

Titration Rules
system_set_rate

Set Infusion Rate Inputs
system_od_general

General Observation Details Function
system_fetch_TSsys

Fetch System Timescale
system_report_glp

Report GLP Study
system_estimate_parameters

Control Estimation Process
system_nm_check_ds

Check NONMEM Dataset for Automatic Definitions
system_report_init

Initialize a New Officer Report
system_glp_save

Save results from a GLP Study design
var2string_gen

Convert R Objects to Strings
system_fetch_parameters

Fetch System Parameters
workshop_fetch

Fetch Ubiquity Workshop Sections
system_fetch_template

Create New Template After Building System File
system_report_ph_content

Populate Placeholder In Officer Report
system_report_nca

Report NCA
system_zero_inputs

Zero All Model Inputs
system_new_list

Fetch list of internal system templates
system_fetch_set

Fetch Mathematical Set
sample_around

Define Sample Times Around Events
system_load_data

Loading Datasets
system_glp_scenario

Design GLP Study For a Scenario
system_ts_to_simtime

Convert Time in Timescale to Simulation Time
system_check_requirements

Check For Perl and C Tools
system_report_doc_set_ph

Sets Placeholder Content for Word Document Report
system_log_debug_save

Save variables to files
system_report_slide_title

Generate Title Slide
system_report_slide_two_col

Generate Slide with Two Column Layout
system_set_tt_cond

Define Titration Triggers and Actions
system_set_tt_bolus

Actual Function Called by SI_TT_BOLUS
system_set_bolus

Set Bolus Inputs
system_simulate_estimation_results

Simulate Results at Estimates
system_select_set

Selecting Parameter Sets
system_set_tt_rate

Actual Function Called by SI_TT_RATE
system_report_doc_format_section

Formats the Current Document Section
system_report_slide_content

Add Slide With Main Body of Content
system_glp_init

Initialize GLP study design
timecourse_stats

Calculate Timecourse Statistics for a Matrix of Responses
toc

Implementation of Matlab toc() command
system_report_slide_section

Generate Slide with Section Break
tic

Implementation of Matlab tic() command
system_req

Require Suggested Packages
system_set_iiv

Set Variability Terms
system_set_option

Setting Analysis Options
system_view

View Information About the System
system_set_parameter

Set Value for Parameter
system_set_covariate

Set Covariate Values
system_report_save

Save Report to File
system_log_init

Initialize System Log File
system_report_set

Overwrite officer Object for a Given Report
ubiquity_name_check

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

Converts Numeric Variables into Padded Strings
vp

Print and Log Messages
system_set_guess

Alter Initial Guess and Parameter Bounds
archive_estimation

Archive Estimation Results
build_system

Building The System
GUI_log_entry

Wrapper for system_log_entry Used in ShinyApp
calculate_objective_pso

pso Wrapper for calculate_objective
AUC_Bailers_method

AUC for sparse data
calculate_variance

Calculates the Variance in od_general
apply_sub_file_COV

Extracts Covariates for a Subject from a Subject Data File
calculate_objective

Calculates the Value of the Specified Objective Function
calculate_objective_ga

GA Wrapper for calculate_objective