README.md

scriptR

This package contains a variety of functions for reproducible research in R. Provided are a variety of functions that simplify logging, asserting, scripting in R.

Load Libraries

File Manipulation and Creation

Logging

Reporters report_function_name() wrapper function, logs the function's name report_args() wrapper function, logs arguments passed to function report_dim() wrapper function, logs the dimensions before and after report_na() wrapper function, logs number of NA per column of the data frame

Assertions assert_cols_in() asserts that columns are inside a DF assert_between_boundaries() wrapper function, asserts specified columns of DF are between specified boundaries assert_between_n_std() wrapper function, asserts specified columns of DF are between specified standard deviations from the mean assert_in() wrapper function, asserts specified columns of DF have values that are in specified lists assert_col_types() wrapper function, asserts specified columns of DF are specified types assert_dim() wrapper function, asserts resulting DF has certain dimensions assert_margins_after() wrapper function, asserts resulting DF margins compare to incoming DF assert_none_missing() wrapper function, asserts specified columns of DF are not NA * assert_unique() wrapper function, asserts specified columns of DF are unique

Miscellaneous * is_named_list() checks whether a list is a uniquely named list

Installation

devtools::install_github("jennguyen1/scriptR")

Prerequisites

These functions depend on the following packages: logging, argparse, optparse, tidyverse, data.table. Other data wrangling packages are optional (see lib function).



jennguyen1/scriptR documentation built on May 29, 2019, 1:05 a.m.