DALY_list: Make list of 'DALY' objects

Description Usage Arguments Value Author(s) See Also Examples

Description

This function produces a list of DALY objects and assigns class 'DALY_list' to it. Methods are available to print and plot the resulting object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
DALY_list(...)

## S3 method for class 'DALY_list'
print(x, ...)

## S3 method for class 'DALY_list'
plot(x, prob = 0.95, sort = TRUE, names = NULL,
     bars = TRUE, col = c("grey90", "white"),
     error_bars = TRUE, eb_col = "black",
     grid = TRUE, ...)

Arguments

...

In DALY_list: Multiple objects of class 'DALY';
In print.DALY_list: Additional arguments to be passed to print.DALY;
In plot.DALY_list: Additional arguments to be passed to plot.DALY

x

Object of class 'DALY_list'

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 element of the constituting DALY objects

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

Value

An object of S3 class 'DALY_list'.

Author(s)

brechtdv@gmail.com

See Also

getDALY
print.DALY
plot.DALY
scatterplot

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
17
18
## Not run: 

##= load NCC example ======================================
setDALYexample(1)

##= calculate DALYs under different scenarios =============
ncc_00 <- getDALY(aw = FALSE, dr = 0)
ncc_03 <- getDALY(aw = FALSE, dr = 0.03)
ncc_13 <- getDALY(aw = TRUE,  dr = 0.03)

##= store results as 'DALY_list' ==========================
ncc <- DALY_list(ncc_00, ncc_03, ncc_13)

##= barplot of different scenarios ========================
par(mar = c(4, 4, 1, 1) + .5)
plot(ncc, names = c("DALY[0,0]", "DALY[0,0.03]", "DALY[1,0.03]"))

## End(Not run)

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