Skip to contents

Data Ingestion

Ingest Data.

write_nonmem()
Write a csv file compatible with nonmem

Data Manipulation

chunk() ids_per_plot() chunk_grp() chunk_list() chunk_grp_list()
Chunking
chunk_df()
Chunking dataframes
max_through()
give the max value up to that point
min_through()
give the min value up to that point
set_bins()
Given a set of bin ranges, assign each value to a bin
set_bins_df()
Given a set of bin ranges, assign each value to a bin and provide the label
posmat()
Coerce a Matrix to be Positive Definite
snap()
Coerce Values to Nearest of Candidates
numeric_time()
Convert clock time to decimal equivalent

Summaries

s_pauc_() s_pauc()
summarize paucs
s_quantiles_() s_quantiles()
Summarize quantiles for a column
pool()
Test Set Relations Among Two Vectors
pool_df()
Display overlapping names between data.frames
nasum()
Display a count of NAs by column in a data.frame
nsub()
Count number of IDs in a NONMEM data set
gm_mean()
Geometric mean with NA handling and optional zero propagation
search_df()
Search for value in a data.frame
is_distinct()
Check if a group of columns are distinct
row_compare()
Find all columns where rows are not identical
show_labels()
Show column labels

Formatting

capitalize_names()
Capitalize all names for a dataframe
ordinal_to_binary_()
convert a column of categorical covariates into a number of columns with a binary flag for each category
replace_dots()
Convert '.' values into missing values.
pad_left()
Add character to left of every character
parens()
Wrap Text in Parentheses
ht()
Display top and bottom of data frame
right()
Extract letters from end of string
hash()
Add hash character to start of each line

Pharmacometrics-specific

auc_inf()
Calculate AUCt-inf
auc_partial()
Calculate partial AUC
resample_df()
resampling
as.nmctl() as.character(<nmctl>) as.list(<nmctl>) format(<nmctl>) print(<nmctl>) read.nmctl() write.nmctl()
Create, Manipulate, Read, and Write NONMEM Control Streams
half_life()
Estimate elimination half-life from 2-compartment model
pretty_dose()
Overwrite DOSE column into factor and ordered by value

File paths

this_file_name() this_dir_name() this_file_path() this_dir_path() this_file_proj() this_dir_proj()
Return the current script's file name or directory
tf_options() tf_options_clear() mrg_script() tables_to() figures_to()
Set options for annotating and saving tables and figures
proj_rel()
Calculate the path relative to the project root
ghere()
Glue variables into here::here() path