Learn R Programming

DALY (version 1.5.0)

hist.DALY: Histogram method for class 'DALY'

Description

Plot a standardized histogram of DALY Calculator output.

Usage

"hist"(x, xval = c("DALY", "YLD", "YLL", "cases", "deaths"), prob = 0.95, central = c("mean", "median"), breaks = 25, fill = "grey95", ...)

Arguments

x
Object of class 'DALY'
xval
Value to plot on x-axis; must be any of c("DALY", "YLD", "YLL", "cases", "deaths")
prob
Probability span by plotted credibility interval; defaults to 0.95
central
Plotted central value of distribution; must be any of c("mean", "median")
breaks
See hist; the default is 25 bars
fill
The colour to be used to fill the bars
...
Additional arguments to be passed to gpar

Details

This function plots a standardized histogram of DALY Calculator output. The histogram contains by default 25 bars. The limits of the credible interval are denoted by vertical lines; the credible interval limits and central tendency are printed above the histogram.

See Also

plot.DALY DALYcalculator (for a brief description of the DALY Calculator) DALYmanual (for a more comprehensive overview)

Examples

Run this code
## Not run: 
# 
# ##= load NCC example ======================================
# setDALYexample(1)
# 
# ##= perform DALY calculation, store results in 'x'  =======
# x <- getDALY()
# 
# ##= plot histogram of total deaths ========================
# ##= + show 90% credible interval & median =================
# hist(x, xval = "deaths", prob = 0.90, central = "median")
# ## End(Not run)

Run the code above in your browser using DataLab