year_to_date_sum: This function calculates the Year to date sum for Figure 1 in...

Description Usage Arguments Value Examples

View source: R/year_to_date_sum.R

Description

This function calculates the Year to date sum for Figure 1 in the report calculates rolling sum depending on the year to date. e.g. year_to_date = "Jun" calculates the cumulative sum Mar to June (2 obsevations as quarterly data).

Usage

1
year_to_date_sum(data, year_to_date)

Arguments

data

raw data returned from the API call

year_to_date

Last month in quarter: March, June, September, December

Value

list containing data frame, dates and length of time series

Examples

1
## Not run: year_to_date_sum (data, "Mar")

DFoly/ninorap documentation built on Aug. 15, 2019, 12:52 a.m.