Description Usage Arguments Details Value Author(s)
View source: R/extract_cumulative_cases.R
Data from ProMED and HealthMap contain counts for suspected and confirmed cases, and suspected and confirmed deaths. This function adds up the case counts in the specified categories as the cumulative case count. The categories are:
1 2 3 4 | get_cumulative_cases(
x,
case_type = c("scc", "sc", "cc", "scd", "sd", "cd", "ALL")
)
|
x |
data from ProMED and HealthMap. Should only contain numeric columns called "sc", "cc", "sd", "cd". |
case_type |
quoted character. should be one of scc, sc, cc, scd, sd, cd or ALL. |
scc: suspected and confirmed cases sc: suspected cases cc: confirmed cases scd: suspected and confirmed deaths sd: suspected deaths cd: confirmed deaths ALL: suspected and confirmed cases, and suspected and confirmed deaths
The cumulative case count for a date will be NA if ALL counts in the specified categories on are NA for this date. Otherwise, it is the sum of the available values with NAs removed.
numeric vector of cumulative case counts.
Sangeeta Bhatia
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.