Description Usage Arguments Details Value Examples
This function, given a vector ov calendar years, returns a list of dataframes containig a the month and year columns from each yearly dataset. The function returns a warning if there is no data file for a given year.
1 | fars_read_years(years)
|
years |
a vector of integers, or objects that can be coerced into integers, representing specific years of FARS data. |
The function uses imported dplyr::mutate()
and dplyr::mutate()
to prepare the dataframe.
A list of dataframes (one list element per year). Each dataframe contains two columns: MONTH and year, and has as many rows as the source dataset
1 2 3 | my_file <- system.file("extdata", "fars_data.zip", package = "fars")
unzip(my_file, junkpaths = TRUE)
fars_read_years(2013:2015)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.