Description Usage Arguments Value Note Examples
This is a function that takes a year or a list of years in numeric format, reads in the FARS data files for the corresponding years, and returns a list of tables for each year. Each table contains only the data for two variables: the year and months for which FARS data are available in that year
1 | fars_read_years(years)
|
years |
a year in numeric format or a list of such years |
This function returns a list, each element of which is a two-column table (tibble) with one column describing the year and the other column describing the month for each observation in the FARS dataset.
providing multiple years that are not in the list format as an argument will cause an error. Also, the function will produce an error if the dplyr package is not loaded.
1 2 3 4 | ## Not run:
fars_read_years(2015)
fars_read_years(list(2014, 2015))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.