dayOfDiseaseColumn: Adding Day of Disease Column

Description Usage Arguments Value Examples

View source: R/mattDataAugmentation.R

Description

Adds a column of the data frame that gives the day of the disease, with day 1 being the first date seen in the passed-in data frame in which the threshold number of cases was reached in the value column of the data frame.

Usage

1
dayOfDiseaseColumn(df, threshold = 100)

Arguments

df

a data frame for which this day of disease column will be created. This data frame must contain a column labeled as "date" which is of type "Date"

threshold

the number of cases required to state the "start" of the disease. Default is 100, which conforms with epidemiology convention.

Value

Output is the passed-in data frame with the addition of a day_of_disease column.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

smorsink1/ncov2019 documentation built on March 27, 2020, 7:22 p.m.