powered by
plots life expectancy for each age and each year as functional time series.
# S3 method for lifetable plot( x, years = x$year, main, xlab = "Age", ylab = "Expected number of years left", ... )# S3 method for lifetable lines(x, years = x$year, ...)
# S3 method for lifetable lines(x, years = x$year, ...)
Output from lifetable.
lifetable
Years to plot. Default: all available years.
Main title.
Label for x-axis.
Label for y-axis.
Additional arguments passed to plot.fds.
plot.fds
Rob J Hyndman
life.expectancy, lifetable.
life.expectancy
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