This function takes an extracted table from either extract_demographics or extract_timevarying and returns the table having dealt with out of range values. Currently this will either modify the value to NA, or limit the value at an appropriate max or min.

clean(tbl = NULL, dq_ref = NULL)

Arguments

tbl

a table extracted from the CC-HIC database

dq_ref

a tibble if you want to override the default boundary conditions with the following column headings:

code_name

the code name for the data item as it appears in your table

range_min

the lower bound you want to set

range_max

the upper bound you want to set

Value

a table of the same dimentions as tbl but with values cleaned