View source: R/plot_cum_risk.R
plot_cbar | R Documentation |
plot_cbar
plots the results of cumulative risk dynamics
as a bar chart (with percentages of risk event counts
for each period t on a horizontal bar).
plot_cbar(
r = 0.5,
t = NA,
N = 100,
horizontal = TRUE,
sort = FALSE,
N_max = 100,
bar_width = 0.5,
show_trans = 1,
show_ev = TRUE,
show_n = FALSE,
show_bin = FALSE,
colors = c("firebrick", "grey96", "green4", "grey40")
)
r |
risk (probability of occurrence per time period).
A non-scalar vector allows for different risk values
at different times (and |
t |
time periods/rounds.
Default: |
N |
population size.
Default: |
horizontal |
logical: Draw horizontal vs. vertical bars? |
sort |
logical: Sort outputs by number of event occurrences?
Default: |
N_max |
maximum N value plotted (for zooming in for small |
bar_width |
width of (horizontal/vertical) bar per time period.
Default: |
show_trans |
numeric: Show transition polygons (between bars)?
Values of 0/1/2/3 focus on no/new/remaining/both risk segments, respectively.
Default: |
show_ev |
logical: Show number of risky event occurrence (as bar label)?
Default: |
show_n |
logical: Show population frequency of risky event occurrences (as bar label)?
Default: |
show_bin |
logical: Show risky event history as binary state representation (as bar label)?
Default: |
colors |
A vector of color values
(for risk event frequency being |
data of p-values, named by number of event occurrences (invisibly, as list of named vectors, for each time period t).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.