Create an interactive plot for exposure duration
plotly_exp_duration.Rd
Create an interactive plot for exposure duration
Arguments
- outdata
An
outdata
object created fromprepare_exp_duration()
.extend_exp_duration()
can also be applied.- color
Color for a histogram.
- display
A character vector of display type.
n
orprop
can be selected.- display_total
A logical value to display total.
- plot_group_label
A label for grouping.
- plot_category_label
A label for category.
- hover_summary_var
A character vector of statistics to be displayed on hover label of bar.
- width
Width of the plot.
- height
Height of the plot.
Examples
# Only run this example in interactive R sessions
if (interactive()) {
meta <- meta_sl_exposure_example()
outdata <- meta |>
prepare_exp_duration() |>
extend_exp_duration(
duration_category_list = list(c(1, 7), c(7, 21), c(21, 84)),
duration_category_labels = c("1-7 days", "7-21 days", "21-84 days")
)
outdata |> plotly_exposure_duration()
}