Runs check_schema and turns the result into a hard stop, for use at
the tail of a cleaning script (before write_rds) so a nonconforming
study fails loudly where it is built. Any failing "error" check stops;
any failing "warn" check emits a warning. Returns the report invisibly.
See also
Other schema assertions:
assert_key_unique(),
assert_no_labelled(),
check_schema()
Examples
dat <- data.frame(resp_id = 1:3, weights = 1, Z = c(0, 1, 0), Y = c(0, 1, 1))
assert_schema(dat)