Description Usage Arguments Value Note Examples
View source: R/fars_functions.R
The "fars_read_years" function reads yearly data of FARS datasets
into a list where each element of the list contains specific data for the given year.
You can customize the years of which you want to get more information (using
the years
argument). The function reads the specified FARS datasets and
mutates a new variable ("year") for the certain year, and selects the "MONTH"
attribute from the dataset, then gives a list of data tables of these two attributes
as a result.
1 | fars_read_years(years)
|
years |
A number or vector of numbers describing the years to analyze |
This function returns a list containing the data tables with two variables ("MONTH", "year").
There is an error handling with a tryCatch() function. In case of any errors, it results in a warning.
1 2 3 4 5 6 | ## Not run:
fars_read_years(2015)
fars_read_years(c(2013, 2014))
fars.year <- fars_read_years(2013)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.