Add dates column to dataframe.

.add_date_column(
  estimates,
  ref_date,
  time_step,
  index_col = "idx",
  keep_index_col = FALSE
)

Arguments

estimates

dataframe. Estimates.

ref_date

Date. Optional. Date of the first data entry in incidence_data

time_step

string. Time between two consecutive incidence datapoints. "day", "2 days", "week", "year"... (see seq.Date for details)

index_col

string. Name of the index column. The index tracks which data point in bootstrapped values corresponds to which data point in the original values.

keep_index_col

boolean. Keep index column in output?

Value

estimates dataframe with dates column.