Skip to contents

Accepts either wtpumf (PUMF release) or wtdf (full dataset) as the weight column; otherwise all documented raw PUMF columns must be present.

Usage

morie_cpads_has_raw_columns(frame)

Arguments

frame

A data.frame.

Value

Logical scalar; TRUE if the frame contains the raw CPADS PUMF schema, FALSE otherwise.

Examples

cols <- unname(unlist(morie_cpads_contract()$raw_column_map))
df <- as.data.frame(stats::setNames(rep(list(1L), length(cols)), cols))
morie_cpads_has_raw_columns(df)
#> [1] TRUE
morie_cpads_has_raw_columns(data.frame(x = 1))
#> [1] FALSE