Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.lifetable

Plot life expectancy from lifetable


Description

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

Usage

## S3 method for class 'lifetable'
plot(x, years = x$year, main, xlab = "Age",
  ylab = "Expected number of years left", ...)

## S3 method for class 'lifetable'
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.

Author(s)

Rob J Hyndman

See Also

Examples

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)

demography

Forecasting Mortality, Fertility, Migration and Population Data

v1.22
GPL (>= 2)
Authors
Rob J Hyndman with contributions from Heather Booth, Leonie Tickle and John Maindonald.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.