check_range: Check Variable Against Specified Range

Description Usage Arguments Details Value

Description

Check if specified variable is outside of provided boundaries. Original name: fCheckOutsideRange.

Usage

1
check_range(data, var, cond, return_pos = FALSE)

Arguments

data

A data frame.

var

A variable (column) name.

cond

A logical condition for outside values (see details).

return_pos

Should a vector cases outside the range also be returned?

Details

Example of condition structure: c(' <= ', 0) or c(' <= ', 0, '|', '>', 20) Allowed relational operators: < <= == >= > != Allowed logical operators: & |

Value

Warnings are produced if a variable is outside specified range. If return_pos = TRUE, a vector containing the positions of cases that are outside the range is also returned.


grahamstewart12/tidyflux documentation built on June 4, 2019, 7:44 a.m.