epict_check_raw_obs: Check unproccessed observations meet the package...

View source: R/preprocess.R

epict_check_raw_obsR Documentation

Check unproccessed observations meet the package specification

Description

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.

Usage

epict_check_raw_obs(obs, dates_available = TRUE, check_onset = FALSE)

Arguments

obs

A data.frame with the following variables:

  • id: An integer vector uniquely identifying each infection.

  • test_id: An integer vector uniquely identifying each test

  • ct_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/asymptomatic

  • onset_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. If FALSE 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.

Value

Input observations are returned.

Author(s)

Sam Abbott

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()


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