Description Usage Arguments Details Value Examples
This function takes a vector of strings or numerics, uses lapply to call make_filename() for each year in the vector, and attempts to read in data for each file name with fars_read.
1 | fars_read_years(years)
|
years |
a vector of strings or numerics, each in "yyyy" format. |
The function then uses mutate() to add a column specifying the year and returns a dataframe consisting of the month and year of each row.
If fars_read() fails to read in data for a particular year, it prints a warning to the user and returns NULL.
A list of dataframes, one for each year in years
1 2 3 4 | ## fars_read_years(2014)
## years <- 2013:2015
## data <- fars_read_years(years)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.