Skip to contents

Data I/O

Reading and writing of data

Data input

read_data()
read external data with logging of results

Data output

output_data()
export R data for NONMEM modeling

Other

make_readonly()
Sets the read-only attribute for all files available within a folder

Data manipulation

General data manipulations, calculation of new variables, etc.

wrapper dplyr functions

left_joinr()
Perform a left join of two data frames with logging of results
filterr()
Filter data with logging of results

NONMEM specific functions

time_calc()
Create time variables for usage in NONMEM analyses

Dosing functions

create_addl()
Create ADDL data item and deletes unnecessary amount lines
expand_addl_ii()
Expand rows in case ADDL and II variables are present
fill_dates()
Fills down dates within a data frame that include a start and end date
impute_dose()
Imputes dose records using ADDL and II by looking forward and backwards

Covariate functions

egfr()
Calculates EGFR values based on different types of formulas
weight_height()
Calculates different weight variables
impute_covar()
Imputute missing covariates
num_lump()
Perform lumping of numerical values
flag_outliers()
Creates a flag for outlying values

Meta data

Handle meta data (data attributes)

attr_add()
Add attributes from a list to a dataframe
attr_extract()
Reads in attributes from an external excel file
attr_factor()
Create factors for variables within a data frame using the format attribute
attr_xls()
Reads in attributes from an external excel file

Documentation

Documentation of the data management process

Scripting functions

cmnt()
Add comment to environment to present in documentation
cmnt_print()
Function that prints the comments given by cmnt
get_log()
Retrieve log objects
filterr()
Filter data with logging of results
left_joinr()
Perform a left join of two data frames with logging of results
srce()
Add source information to environment to present in documentation

Tables and data frames

general_tbl()
General table wrapper for documentation functions
counts_df()
Create counts and frequencies within in data frame
stats_df()
Calculate basic statistics on data frame
contents_df()
Create information for multiple data frames
define_tbl()
Create define PDF file for submission of pharmacometric data files
log_df()
Create information for all functions that log actions
check_nmdata()
Checks nonmem dataset for common errors/mistakes
session_tbl()
Create information for R session

Other

plot_vars()
Creates different kind of plots for variables within a dataset using ggplot2

Misceleneous

Helper functions worth to mention

get_script()
Get the current script name (either interactive Rstudio, markdown or batch script)
check_cat()
Create an overview of the available categories