powered by
Takes an existing Lexis grid and adds a coloured rectangle to highlight a certain age.
lexis.year(lg, year, fill = lpr_colours()[3], alpha = 0.7, d = 1)
an existing object originally created with lexis.grid().
lexis.grid()
numeric, set the year to highlight.
character, set the colour of the rectangle. Default is "blue".
"blue"
numeric, set the transparency of the rectangle. Default is 0.5.
0.5
numeric, set the size of the age groups. Default is 1.
A ggplot2 object.
Takes an existing Lexis grid and adds a coloured rectangle to the plot. The rectangle will highlight a certain year in the grid.
# NOT RUN { lg <- lexis.grid(year.start = 1900, year.end = 1905, age.start = 0, age.end = 5) lexis.year(lg = lg, year = 1902) # }
Run the code above in your browser using DataLab