# NOT RUN {
# For 100 deaths with an average age of death of 60 years
# and an expected remaining number of years to live of 20 years:
yll(100, 60, 20)
# Without discounting:
yll(100, 60, 20, discount.rate = 0)
# }
# NOT RUN {
yll("a", "b", "c") # arguments must be numeric
yll(100) # avg.age.death and life.expectancy are missing,
# with no default
yll(100, 60) # life.expectancy is missing,
# with no default
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab