lexis_lifeline {LexisPlotR} | R Documentation |
Plot lifelines into a Lexis grid
Description
Add lifelines to an existing Lexis grid.
Usage
lexis_lifeline(lg, birth, entry = NA, exit = NA, lineends = FALSE,
colour = lexisplotr_colours()[5], alpha = 1, lwd = 0.5)
Arguments
lg |
an existing object originally created with |
birth |
character, set the birth date of an individual in format |
entry |
character, set the entry of an individual in format |
exit |
character, set the exit or death date of an individual in format |
lineends |
logical, if |
colour |
character, set the colour of the lifelines. |
alpha |
numeric, set the transparency of the lifelines. Default is |
lwd |
numeric, set the linewidth of the lifelines. Default is |
Details
Takes an existing Lexis grid and adds lifelines to the grid. Input can be a single dates or dates from a vector.
Value
A ggplot2 object.
Author(s)
Philipp Ottolinger
Examples
lg <- lexis_grid(year_start = 1900, year_end = 1905, age_start = 0, age_end = 5)
lexis_lifeline(lg = lg, birth = "1901-09-23")
lexis_lifeline(lg = lg, birth = "1901-09-23", entry = "1902-04-01")
lexis_lifeline(lg = lg, birth = "1901-09-23", exit = "1904-10-31")
[Package LexisPlotR version 0.4.0 Index]