Description Usage Arguments Value Note Examples
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
.
1 | fars_read_years(years)
|
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. |
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.
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".
1 | fars_read_years(2013:2015)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.