Learn R Programming

burnr (version 0.6.1)

get_year: Extract fhx observations for given years

Description

Extract fhx observations for given years

Usage

get_year(x, yr)

Arguments

x

An fhx object.

yr

Numeric vector of year(s) to extract from x.

Value

An fhx object.

See Also

Examples

Run this code
# 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