# NOT RUN {
data(lgr2)
get_year(lgr2, 1806)
get_year(lgr2, 1805:1807)
# }
# NOT RUN {
# Subsetting before/after a specific year requires a
# call to year_range(). For example, to extract all observations
# prior to 1900, use
get_year(lgr2, year_range(lgr2)[1]:1900)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab