get_cumulative_cases: Get cumulative case count as sum of specified case categories

Description Usage Arguments Details Value Author(s)

View source: R/extract_cumulative_cases.R

Description

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:

Usage

1
2
3
4
get_cumulative_cases(
  x,
  case_type = c("scc", "sc", "cc", "scd", "sd", "cd", "ALL")
)

Arguments

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.

Details

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.

Value

numeric vector of cumulative case counts.

Author(s)

Sangeeta Bhatia


sangeetabhatia03/promedr documentation built on March 12, 2020, 7:25 a.m.