write_pos_check {validatesuggest} | R Documentation |
Suggest a range check
Description
Suggest a range check
Usage
write_pos_check(d, vars = names(d), only_positive = TRUE, file = stdout())
suggest_pos_check(d, vars = names(d), only_positive = TRUE)
Arguments
d |
|
vars |
|
only_positive |
if |
file |
file to which the checks will be written to. |
Value
suggest_pos_check
returns validate::validator()
object with the suggested rules.
write_pos_check
write the rules to file and returns invisibly a named list of checks for each variable.
Examples
data(SBS2000, package="validate")
suggest_range_check(SBS2000)
# checks the ranges of each variable
suggest_range_check(SBS2000[-1], min=TRUE, max=TRUE)
# checks the ranges of each variable
suggest_range_check(SBS2000, vars=c("turnover", "other.rev"), min=FALSE, max=TRUE)
[Package validatesuggest version 0.3.2 Index]