r <- rule(mpg > 10)
r
r2 <- rule(mpg > 10, name = "check that mpg is reasonable", allow_na = TRUE,
negate = FALSE, author = "me", date = Sys.Date())
r2
check_data(mtcars, r)
rs <- ruleset(
rule(mpg > 10),
rule(cyl %in% c(4, 6)), # missing 8
rule(qsec >= 14.5 & qsec <= 22.9)
)
rs
check_data(mtcars, rs)
Run the code above in your browser using DataLab