Description Usage Arguments Details Value Note Examples
View source: R/fars_functions.R
This function is used inside of the fars_summarize_years()
function
and input for the years
argument comes from the years
argument
of the fars_summarize_years()
function.
1 | fars_read_years(years)
|
years |
A vector of years for the files you're interested in. |
This function takes a vector of years as input and uses lapply()
to
make a filename for each year, read in that file as a tibble and select the
month and year columns in that tibble.
This function returns a list, with each element of the list being a
tibble for each year in the vector of years specified in argument years
.
Each tibble in the list contains two columns, "MONTH" and "year".
if even one of the years in the vector passed to argument years
does not exist (if there is no file for that year), no results, only an error
message, will be returned; "invalid year: 2017" for example.
1 | fars_read_years(c(2013, 2014, 2015))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.