Learn R Programming

covidregionaldata (version 0.8.2)

get_cumulative_from_daily: Cumulative counts from daily counts.

Description

Gets cumulative cases/deaths etc. from data which is in daily forms. Similar to cumsum() but deals with NAs by treating them as 0.

Usage

get_cumulative_from_daily(column)

Arguments

column

A vector of numeric data (e.g. a data column) which corresponds to daily counts of a process. Can contain NA

Value

A vector of numeric data which corresponds to cumulative counts