Check unproccessed observations meet the package specification
Source:R/preprocess.R
epict_check_raw_obs.Rd
Checks the available raw data for required variables and returns informative errors, warnings, and messages about the structure of the observations. It can be used both on datasets referenced using dates and datasets referenced using relative time.
Arguments
- obs
A data.frame with the following variables:
id
: An integer vector uniquely identifying each infection.test_id
: An integer vector uniquely identiying each testct_value
: Numeric cycle threshold value.test_date
: Date of the test yielding a Ct value. (optional)t
: Time of test relative to a baseline date. Optional but required if test_date is not present.onset_date
:e Date of onset for each infection (optional).NA
if unavailable/asymptomaticonset_t
: Time on onset relative to a baseline date (optional).censored
: Logical, indicating if the Ct has been censored.
- dates_available
Logical, defaults to
TRUE
. Are dates available in the observed data. IfFALSE
it is assumed that relative times should be available instead.- check_onset
Logical, defaults to
FALSE
. Should observations be checked for the presence of symptom onset data.
See also
Preprocessing functions
epict_check_obs()
,
epict_clean_factors()
,
epict_drop_na_ct()
,
epict_filter_ids()
,
epict_flag_spurious_obs()
,
epict_make_time_rel_to_first_uncensored()
,
epict_make_time_rel()