Learn R Programming

LexisPlotR (version 0.4.0)

lexis.cohort: Deprecated. Emphasize a certain cohort in a Lexis grid

Description

Takes an existing Lexis grid and adds a coloured rectangle to highlight a certain cohort.

Usage

lexis.cohort(lg, cohort, fill = lpr_colours()[4], alpha = 0.7, d = 1)

Arguments

lg,

an existing object originally created with lexis.grid().

cohort

numeric, set the cohort to highlight.

fill

character, set the colour of the rectangle. Default is "green".

alpha

numeric, set the level of transparency of the rectangle. Default is 0.5.

d

numeric, set the size of the age groups. Default is 1.

Details

Takes an existing Lexis grid and adds a coloured rectangle to the plot. The rectangle will highlight a certain cohort in the Lexis grid.

Examples

Run this code
# NOT RUN {
library(LexisPlotR)
lg <- lexis.grid(year.start = 1900, year.end = 1905, age.start = 0, age.end = 5)
lexis.cohort(lg = lg, cohort = 1901)
# }

Run the code above in your browser using DataLab