inst/tinytest/run_validation/validations.R

# File to bu run by run_validaitons

# Three rules
rules <- validator(height >= 0, weight >= 0, weight >= height)

checks <- confront(women, rules)

# programming over confrontations
if ( all(checks) ){ # should be TRUE
  # Four rules
  check_that(women, height/weight >= 0.4)
}

Try the validate package in your browser

Any scripts or data that you put into this service are public.

validate documentation built on March 24, 2022, 5:07 p.m.