R/data.R

# Documentation for data sets


#' Fake data set of respiratory panel data
#'
#' Simulated data set of respiratory panel data (rows of fake Gastro Intestinal
#'  data also included). Raw input data for the turnr package should mimic
#'  the structure of this dataset
#'
#' @format A data frame with 16 variables:
#' \describe{
#'   \item{RunDataID}{unique identifier of that patient test}
#'   \item{StartTime}{Approximate time of the test}
#'   \item{PouchTitle}{Type of panel, either 'Respiratory_Panel' or
#'         'Gastro_Intestinal'}
#'   \item{ResultType}{This is the assay name within the test}
#'   \item{TargetName}{Name of pathogen or control}
#'   \item{TargetShortName}{Short name for pathogen (left as NA here)}
#'   \item{TargetResult}{in this data set 'Pass' for controls and 'Positive'
#'      for pathogens, no negatives included here}
#'   \item{InstrumentSerialNumber}{Unique identifier of the instrument}
#'   \item{InstrumentVersion}{type of instrument}
#'  \item{AssayName}{This is the assay used to call determine the
#'       pathogen or target}
#'  \item{AssayResult}{Assay Result, only positives are shown in this datasheet}
#'  \item{Country}{Only U.S. in this fake dataset}
#'  \item{Region}{State}
#'  \item{ZipCode}{Zip codes used here may not be real}
#'  \item{FlaggedAsValidation}{Flag of whether test likely a validation (0, 1)}
#'  \item{SiteID}{Unique ID of the lab}
#'   ...
#' }
"rp_raw"


#' Tests per day by site and instrument version
#'
#' Total number of tests per day for both respiratory panel and all panels
#' as well as the number of active instruments, by Site, date and
#' InstrumentVersion. This data set is just a summary of the fake rp_raw
#' example dataset (see \code{?turnr::rp_raw}). This data set was generated by
#' running
#' \code{turnr::calc_active_instruments(turnr::pre_process(rp_raw))}.
#' Mostly just created to be used in examples for functions.
#'
#' @format A data frame with 6 variables:
#' \describe{
#'   \item{SiteID}{Unique ID of the lab}
#'   \item{date}{date}
#'   \item{daily_TUR_rp}{number of respiratory panel tests that day}
#'   \item{daily_TUR_all}{number of all tests that day}
#'   \item{n_active}{number of active instruments}
#'   \item{InstrumentVersion}{type of instrument, or 'all' for all
#'      InstrumentVersions combined}
#'   ...
#' }
"TUR_dat"


#' Number of positive detections by pathogen per day
#'
#' Total number positive tests for each pathogen, by Site, date and
#' InstrumentVersion. This data set is just a summary of the fake rp_raw
#' example dataset (see \code{?turnr::rp_raw}). This data set was generated by
#' running
#' \code{calc_count_by_site_inst(co_detection(pre_process(rp_raw)))}.
#' Mostly just created to be used in examples for functions.
#'
#' @format A data frame with 6 variables:
#' \describe{
#'   \item{SiteID}{Unique ID of the lab}
#'   \item{date}{date}
#'   \item{daily_count}{number of positive tests for given pathogen, that day}
#'   \item{TargetName}{name of pathogen, also 'negative' for no pathogens,
#'   or 'co-detection' if more than one pathogen was positive}
#'   \item{InstrumentVersion}{type of instrument, or 'all' for all
#'      InstrumentVersions combined}
#'   ...
#' }
"path_dat"
MartinHoldrege/turnr documentation built on May 16, 2020, 10:39 a.m.