fars_read_years: fars_read_years

Description Usage Arguments Value Note Examples

View source: R/documents.R

Description

fars_read_years produces a set of two columned tibbles (MONTH , year), indiced by year for each year in the FARS data. year <- c(2013, 2014, 2015), or, year <- c(2000:2020), etc. Returns a warning if the year is not in the data. It is used in conjunction with fars_summarize_years.

Usage

1

Arguments

fars_summarize_years

years: A vector of the years which exist in the data, or which are being searched for. Created un the global environment but passed from the summarize function.

Value

The object returned is set of two-columned tibbles indiced by year where each element of the tibble is an instance of a fatal autocollision during that month and year.

Note

if 'years' vector has not been created in the global environment then it return an error

if year[i] isnt an element of years, it returns an error: "invalid year".

Examples

1
fars_read_years(2013:2015)

Centurione/FARS_Package documentation built on Dec. 30, 2019, 6:01 p.m.