Skip to contents

Errors when the expected schema's column is absent. Warns when BOTH schemas are present (downstream code MAY accidentally use the wrong one).

Usage

morie_tps_assert_hood_version(df, expected = c("158", "140"))

Arguments

df

A TPS crime data.frame.

expected

Either "158" or "140".

Value

Invisibly TRUE on success.

Examples

cw <- morie_to_hood_crosswalk()
df <- data.frame(HOOD_158 = utils::head(cw$hood_158, 5))
res <- try(morie_tps_assert_hood_version(df, expected = "158"))