Description Usage Arguments Details Value References See Also Examples
View source: R/fars_functions.R
fars_read_years
reads Fatality Analysis Reporting System (FARS) files
for multiple years
and rearranges the data such that each row contains
one incident with columns MONTH and year.
1 | fars_read_years(years)
|
years |
(character or (integer) ) A vector containing the desired years.
Both numeric and character vectors are allowed for |
list is also allowed for year
but not recommended.
Files must exist in current working directory.
If files are not found in current working directory, execution is stopped and a warning is thrown.
fars_read_years
is a helper function for fars_summarize_years
.
A list containing the rearranged datasets for each given year.
US National Highway Traffic Safety Administration
(https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars)
fars_read
, make_filename
, fars_summarize_years
1 2 3 4 5 6 7 | ## Not run:
lst <- fars_read_years(c(2014, 2015))
lst <- fars_read_years(c("2014", "2015"))
# also usage of lists is allowed:
lst <- 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.