Learn R Programming

assertable

Verbose Assertions for Tabular Data (Data.frames and Data.tables)

Simple, flexible, assertions on data.frame or data.table objects with verbose output for vetting. While other assertion packages apply towards more general use-cases, assertable is tailored towards tabular data. It includes functions to check variable names and values, whether the dataset contains all combinations of a given set of unique identifiers, and whether it is a certain length. In addition, assertable includes utility functions to check the existence of target files and to efficiently import multiple tabular data files into one data.table.

Copy Link

Version

Install

install.packages('assertable')

Monthly Downloads

529

Version

0.2.8

License

GPL-3

Maintainer

Grant Nguyen

Last Published

January 27th, 2021

Functions in assertable (0.2.8)

check_files

Check for the existence of a vector of files, optionally repeated for a set amount of time.
assert_values

Assert that a data.frame's columns are non-NA/infinite, or are greater, less than, equal/not-equal, or contain specified values.
assert_ids

Assert that a data.frame contains all unique combinations of specified ID variables, and doesn't contain duplicates within combinations
assert_nrows

Assert that a data.frame contains a specified number of rows
assert_colnames

Assert that a data.frame contains specified column names
assert_coltypes

Assert that a data.frame's columns are certain types
import_files

Given a vector of filenames, append all files and return as one data.table using a user-defined function