plot.DALY {DALY} | R Documentation |
Plot a stacked barplot of YLLs/YLDs with a DALY error bar.
## S3 method for class 'DALY' plot(x, prob = 0.95, sort = TRUE, names = NULL, bars = TRUE, col = c("grey90", "white"), error_bars = TRUE, eb_col = "black", grid = TRUE, ...)
x |
Object of class |
prob |
Probability span by DALY error bar;
defaults to |
sort |
Should values be sorted from high to low?
defaults to |
names |
Vector of names to be plotted on the y-axis. If this argument
is |
bars |
Should YLL/YLD bars be plotted?
defaults to |
col |
Color of YLL and YLD barplot;
defaults to |
error_bars |
Should DALY error bars be plotted?
defaults to |
eb_col |
Color of DALY error bars; defaults to black |
grid |
Should a vertical grid be plotted?
defaults to |
... |
Additional arguments to be passed to |
This function plots the results of the DALY calculation aggregated by outcome. By default, both a stacked barplot of YLLs/YLDs and an error bar of total DALYs are shown.
DALYcalculator
(for a brief description of the DALY Calculator)
DALYmanual
(for a more comprehensive overview)
## Not run: ##= load toxoplasmosis example ============================ setDALYexample(2) ##= perform DALY calculation, store results in 'x' ======= x <- getDALY() ##= plot results ========================================== par(mar = c(4, 7, 4, 1)) plot(x) plot(x, bars = FALSE) # only error bars plot(x, error_bars = FALSE) # only barplots ## End(Not run)