epict_check_obs: Check proccessed observations meet the package specification

epict_check_obsR Documentation

Check proccessed observations meet the package specification

Description

Checks the available proccessed observastionsfor required variables and returns informative errors, warnings, and messages about the structure of the observations.

Usage

epict_check_obs(obs, check_onset = FALSE)

Arguments

obs

A data.frame with the following variables:

  • id: An integer vector uniquely identifying eahc infection.

  • test_id: An integer vector uniquely identiying each test

  • ct_value: Numeric cycle threshold value.

  • t: Relative (to a baseline) time of the test yielding a Ct value.

  • t_rel_uncensored: Time of test relative to the first uncensored Ct value for that id.

  • onset_t: Relative (to a baseline) time of onset for each infection

  • onset_t_rel_uncensored: Time of onset relative to the first uncensored Ct value for that id. (optional). NA if unavailable/asymptomatic.

  • censored: Logical, indicating if the Ct has been censored.

check_onset

Logical, defaults to FALSE. Should observations be checked for the presence of symptom onset data.

Value

A data.table of observations ready for use in epict() and other package functions.

Author(s)

Sam Abbott

See Also

Preprocessing functions epict_check_raw_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()


seabbs/epict documentation built on July 3, 2023, 6:42 a.m.