plot.DALY: Plot method for class 'DALY'

Description Usage Arguments Details Author(s) See Also Examples

Description

Plot a stacked barplot of YLLs/YLDs with a DALY error bar.

Usage

1
2
3
4
5
## 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, ...)

Arguments

x

Object of class 'DALY'

prob

Probability span by DALY error bar; defaults to 0.95

sort

Should values be sorted from high to low? defaults to TRUE

names

Vector of names to be plotted on the y-axis. If this argument is NULL, the default, then the names are taken from the name elements of the outcomes

bars

Should YLL/YLD bars be plotted? defaults to TRUE

col

Color of YLL and YLD barplot; defaults to c("grey90", "white")

error_bars

Should DALY error bars be plotted? defaults to TRUE

eb_col

Color of DALY error bars; defaults to black

grid

Should a vertical grid be plotted? defaults to TRUE

...

Additional arguments to be passed to barplot

Details

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.

Author(s)

brechtdv@gmail.com

See Also

hist.DALY

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## 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)

DALY documentation built on May 2, 2019, 12:19 p.m.