plot.lifetable | R Documentation |
plots life expectancy for each age and each year as functional time series.
## 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, ...)
x |
Output from |
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 |
Rob J Hyndman
life.expectancy
, lifetable
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.