check_numeric_range: Check for invalid numeric range

Description Usage Arguments Value Examples

Description

Check a data frame of quadrat data for invalid numeric data. Specify the allowed range by min and max values, and whether the allowed range should include the min and max values.

Usage

1
2
check_numeric_range(df, column_name, min_val = -Inf, max_val = Inf,
  allow_min = T, allow_max = T)

Arguments

df

Data frame of quadrat data

column_name

Name of column in df to be checked

min_val

Minimum allowed value; default = -Inf

max_val

Maximum allowed value; default = Inf

allow_min

T/F: T = indicated minimum value is an allowed value; F = minimum value is not an allowed value. default = T

allow_max

T/F: T = indicated maximum value is an allowed value; F = maximum value is not an allowed value. default = T

Value

Rows from df containing values outside valid range, plus additional columns indicating error_type and error_value. If there are no errors, this will return an empty data frame.

Examples

1
check_numeric_range(df, column_name = 'area', min_val = 0, max_val = 1, allow_min=F, allow_max=T)

emchristensen/quadprocessing documentation built on May 4, 2019, 4:15 a.m.