Description Usage Arguments Details Value Examples
This function takes a vector of years and returns a list of R tibble dataframes consisting of the files loaded. The function loops over the vector of years to load each of the Accident files on the directory whilst manipulating the data on them to create a new collumn "year" and select only the columns "MONTH" and "year".
1 | fars_read_years(years)
|
years |
A character vector of years. |
The function uses fars_read function (fars_read
) and make_filename (make_filename
) to execute the described process.
If an invalid year is retrieved (i.e. if there is no file with the parsed year input), an error is retrieved.
This function uses dplyr package form tidyverse package repository.
A list of R tibble dataframes.
1 2 3 4 5 | ## Not run:
years <- c("2013","2014","2015")
fars_read_years(years)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.