CreateReportIntervals: CreateReportIntervals

Description Usage Arguments Details Value Note

View source: R/sim.R

Description

sim list that contains a "pars" list which contains a "global" list that contains the following objects: sim_start = a POSIXct object for simulation's start, required sim_period = a Period object (from 'lubridate' package), e.g. period(10, "year"), period(10, "week"), period(10, "week") that sets the length of time the simulation runs sim_end = a POSIXct object for simulation's end. Setting this will override the 'sim_period' parameter. Default = NULL. rep_period = a Period object that sets the summary interval rep_interval = vector or dateframe (with date in first column) of the format formatting). Example: c("April01", "May15", "Sep1", "Oct15"). Overrides 'rep_period' parameter. rep_interval_custom = a vector of POSIXct objects that set the start of the summary periods. If sim_start precedes the first value, the first value will go until from start_sim to rep_interval_custom. Last interval will go from the last date in rep_interval_custom to end of sim_period or end_sim. Overrides 'rep_period' or 'rep_interval' parameters.

Usage

1

Arguments

sim

a list that contains a "pars" list which contains a "global" list that sets the arguments for the Report Interval. See Description section below.

Details

Creates summary intervals for the simulation input

Value

list of intervals

Note

Either 'sim_period' or 'sim_end' must be set, and either 'rep_period', 'rep_interval', or 'rep_interval_custom' must be set. For 'rep_interval' the dates can be set as numeric for both day and month, but there is a possibility that the day and month will be inverted because dates with both values <12 can be confused (e.g. 02-10 can be either February 10th or October 2nd. Date format: "10Feb" or "02Oct" is preferred.


Blakemassey/ibmr documentation built on Dec. 25, 2021, 8:39 a.m.