Learn R Programming

LifeTables (version 0.1)

plotMLT: Plotting function for life table quantities

Description

Plots either a single column or scrolls through a plot for each column from a life table calculated from a user supplied mortality rate schedule

Usage

plotMLT(..., mx.out, sex, lt.col = "All", log = FALSE, 
	age = c(0, 1, seq(5, 110, 5)))

Arguments

...
Arguments to pass to par
mx.out
A mortality rate schedule with age groups 0-1, 1-4, 5-9, 10-14,..., up to any open interval.
sex
The sex for the calculated life table. "male" or "female"
lt.col
The desired life table quantity to plot. lt.col="All", the default, will scroll through a plot of each quantity when the user keys "return" after each plot. Otherwise a specific column can be selected by using the following intergers (1-nmx, 2-nqx, 3-npx,
log
Logical. If TRUE and lt.col is not set to "All", the y-axis will be in log scale.
age
The start ages for each interval in the life table

Details

If lt.col=3 (npx) and log=TRUE, a warning message will appear noting that a y value

See Also

lt.mx

Examples

Run this code
mx.examp <- exp(mortmod(pattern=1, alpha=.05, sex="male")) 
plotMLT(mx.out=mx.examp, sex="male", lt.col="All")

plotMLT(mx.out=mx.examp, sex="male", lt.col=3, log=TRUE)

Run the code above in your browser using DataLab