Learn R Programming

LexisPlotR (version 0.4.0)

lexis.survey: Deprecated. Emphasize a survey range in a Lexis grid Takes an existing Lexis grid and adds a coloured parallelogram to highlight a survey range.

Description

Deprecated. Emphasize a survey range in a Lexis grid Takes an existing Lexis grid and adds a coloured parallelogram to highlight a survey range.

Usage

lexis.survey(lg, from_date, to_date, from_age, to_age,
  fill = lpr_colours()[6], alpha = 0.7)

Arguments

lg,

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

from_date

character, set the beginning of the survey in format "YYYY-MM-DD".

to_date

character, set the end of the survey in format "YYYY-MM-DD".

from_age

numeric, set the starting age of the survey.

to_age

numeric, set the ending age of the survey.

fill

character, set the colour to fill the parallelogram. Default is "orange".

alpha

numeric, set the transparency of the fill colour. Default is 0.5.

Details

The function can be used to plot the time and age range of a survey. Use from_date and to_date to specify the time range the survey took place and from_age and to_age to define the considered ages of participants/observations.

Examples

Run this code
# NOT RUN {
library(LexisPlotR)
lg <- lexis.grid(year.start = 1980, year.end = 1990, age.start = 30, age.end = 40)
lexis.survey(lg, from_date = "1982-09-01", to_date = "1986-03-01", from_age = 32, to_age = 36)
# }

Run the code above in your browser using DataLab