
Detect whether a data frame looks like raw CPADS PUMF data.
Source:R/cpads.R
morie_cpads_has_raw_columns.RdAccepts either wtpumf (PUMF release) or wtdf (full dataset) as
the weight column; otherwise all documented raw PUMF columns must be
present.
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