Learn R Programming

demography (version 1.18)

plot.lifetable: Plot life expectancy from lifetable

Description

plots life expectancy for each age and each year as functional time series.

Usage

"plot"(x, years = x$year, main, xlab = "Age", ylab = "Expected number of years left", ...) "lines"(x, years = x$year, ...)

Arguments

x
Output from lifetable.
years
Years to plot. Default: all available years.
main
Main title.
xlab
Label for x-axis.
ylab
Label for y-axis.
...
Additional arguments passed to plot.fds.

Value

See Also

life.expectancy, lifetable.

Examples

Run this code
france.lt <- lifetable(fr.mort)
plot(france.lt)

france.LC <- lca(fr.mort)
france.fcast <- forecast(france.LC)
france.lt.f <- lifetable(france.fcast)
plot(france.lt.f,years=2010)

Run the code above in your browser using DataLab