test_column_sum: Test the sum of a column

Description Usage Arguments Details Value Examples

View source: R/col-tests.R

Description

Performs a test that a specific column has an expected sum.

Usage

1
test_column_sum(df, col, sum_expected)

Arguments

df

A dataframe

col

The unquoted column name of the column you want to test

sum_expected

The expected sum of the column

Details

This function is good to utilize after performing joining operations to validate that no duplicates or missing values have been created.

Value

The dataframe passed to the function.

Examples

1
2
# Basic usage
test_column_sum(mtcars, wt, 102.952)

joshmuncke/easytest documentation built on Aug. 14, 2019, 3:07 p.m.