Description Usage Arguments Value Examples
View source: R/mattDataAugmentation.R
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.
1 | dayOfDiseaseColumn(df, threshold = 100)
|
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. |
Output is the passed-in data frame with the addition of a day_of_disease column.
1 2 3 4 5 6 7 8 9 10 11 | covid_data <- importCovidData()
dayOfDiseaseColumn(covid_data)
covid_us <- filterDiseaseData(covid_data, country = "US")
dayOfDiseaseColumn(covid_us)
zika_data <- filterDiseaseData(importZikaData())
dayOfDiseaseColumn(zika_data)
sars_data <- importSARSData()
dayOfDiseaseColumn(sars_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.