merge_outputs | R Documentation |
Output tibble from list of unsynced module outputs, with an optional date column.
The optional ref_date
argument is the starting date of an input with offset 0.
In general, this will be the date corresponding to the first entry in the original incidence data.
If a reference date is provided with ref_date
, a date column is appended to the tibble,
with sequential dates generated with the time step specified by the time_step
parameter.
merge_outputs(
output_list,
ref_date = NULL,
time_step = "day",
include_index = is.null(ref_date),
index_col = "idx"
)
output_list |
named list of module output objects. |
ref_date |
Date. Optional. Date of the first data entry in |
time_step |
string. Time between two consecutive incidence datapoints.
"day", "2 days", "week", "year"... (see |
include_index |
boolean. Include an index column in output? |
index_col |
string. If |
tibble
shape_incubation = 3.2
scale_incubation = 1.3
delay_incubation <- list(name="gamma", shape = shape_incubation, scale = scale_incubation)
smoothed_incidence <- smooth_incidence(HK_incidence_data$onset_incidence)
deconvolved_incidence <- deconvolve_incidence(
smoothed_incidence,
delay = delay_incubation
)
## Basic usage of merge_outputs
merged_incidence_1 <- merge_outputs(
list("smoothed symptom onset" = smoothed_incidence,
"deconvolved symptom onset" = deconvolved_incidence)
)
## Advanced usage of merge_outputs
merged_incidence_2 <- merge_outputs(
list("smoothed symptom onset" = smoothed_incidence,
"deconvolved symptom onset" = deconvolved_incidence),
ref_date = HK_incidence_data$date[1],
include_index = TRUE,
index_col = "index"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.