Learn R Programming

DALY (version 1.5.0)

aggregate.DALY: Aggregate method for class 'DALY'

Description

Aggregate DALY Calculator output by outcome, age/sex class, or both.

Usage

"aggregate"(x, by = c("total", "class", "outcome"), ...)

Arguments

x
Object of class 'DALY'
by
Any of c("total", "outcome", "class")
...
Additional arguments to be passed to aggregate

Value

For by = "total":For by = "class":For by = "outcome":

See Also

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

Examples

Run this code
## Not run: 
# 
# ##= load the NCC example ==================================
# setDALYexample(1)
# 
# ##= perform DALY calculation, store results in 'x' ========
# x <- getDALY()
# 
# ##= store simulations aggregated by =======================
# ##= outcome and age/sex class     =========================
# y <- aggregate(x, by = "total")
# 
# summary(y$DALY)  # default summary of total DALYs =========
# hist(y$deaths)   # default histogram of total deaths ======
# ## End(Not run)

Run the code above in your browser using DataLab