Description Usage Arguments Details Value Examples
View source: R/fars_functions2.R
fars_read_years
produces a list of tibbles of FARS data, given an
input vector of years.
1 | fars_read_years(years)
|
years |
Vector of years' FARS files to open. Vector members must be an integer, or a string or numeric that can be coerced to a string, of the year of interest. |
This function takes a vector of years and produces a list of tibbles, where each tibble is that year's FARS file year and MONTH observations. This is a simple function that strips all useful data out of the FARS tables and produces a completely useless tibble, but is meant for practice in the Coursera course. For this function to work, valid years should be entered. Invalid years will have a NULL entry in the returned list.
This function returns a list of tibbles, where each tibble contains containing the year and month from the observations in the corresponding year's FARS data. If an invalid year is given, the corresponding list will be NULL.
1 2 3 4 5 6 7 | fars_read_years(years = c(2013, 2014, 2015))
fars_read_years(years = 2013)
## Not run:
fars_read_years(years = 2000) # error
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.