Description Usage Arguments Details Value Errors See Also Examples
View source: R/fars_functions.R
Pre-format dataframe for selection
1 | fars_read_years(years)
|
years |
a list of years |
This function takes a list of years and attempts to read the FARS data file into a data frame for each year. The year is then appended as a column to each data frame, Then it along with the MONTH column are extracted. The result is a 2-column data frame with the same number of rows as the original FARS data for that year containing the MONTH column from the FARS data and the year of the data file.
This function must be called from the directory where the data is located.
This function requires dplyr
a list of tribbles with two columns, MONTH and year
This function will raise an error if a FARS-formatted file for that year cannot be located in the current directory
1 2 3 4 | ## Not run:
years <- fars_read_years(list(2013, 2014))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.