This helper function makes a few simple checks to identify obvious issues with the weights provided.

check_weights(data, weight_col)

Arguments

data

Dataframe of interest.

weight_col

Quoted name of weights column.

Value

Returns NULL. Errors if a problem is discovered.