checkeq {easyr}R Documentation

Check Value or Control Total

Description

Check actual versus expected values and get helpful metrics back. Author: Bryce Chamberlain. Tech review: Lindsay Smeltzer.

Usage

checkeq(
  expected,
  actual,
  desc = "",
  acceptable_pct_diff = 0.00000001,
  digits = 2
)

Arguments

expected

The expected value of the metric.

actual

The actual value of the metric.

desc

(Optional) Description of the metric being checked.

acceptable_pct_diff

(Optional) Acceptable percentage difference when checking values. Checked as an absolute value.

digits

(Optional) Digits to round to. Without rounding you get errors from floating values. Set to NA to avoid rounding.

Value

Message (via cat) indicating success or errors out in case of failure.

Examples

checkeq(expected=100,actual=100,desc='A Match')

[Package easyr version 0.5-8 Index]