Skip to contents

When calculating statistics, it is important that the methodology is applied to observation-model pairs. This function can help identify and fix this situation.

Usage

validate_mod_obs_pairs(
  data,
  mode = c("fix", "error", "warn"),
  dict = mqor::mqo_dict()
)

Arguments

data

A data.frame with numeric columns dict$obs and dict$mod.

mode

One of "fix" (the default), "error" or "warn". If "fix" the function will return a dataframe with any mismatched values set to NA. If "error" or "warn", the the function will either error or warn if mismatched values are detected.

dict

See mqo_dict() for more information. Acts as a data dictionary to specify the columns in the data {mqor} should use.

See also

Author

Jack Davison