Description Usage Arguments Value Examples
This function builds on the functionality of make_filename and
fars_read to read the data from multiple CSV files containing
the data for the years corresponding to the input years. The dplyr
functions mutate and selectare used to tidy the
data and only return the 'MONTH' and 'year' variable collumns respectively.
The base R functiontryCatchis used to catch errors created by
make_filename and show these errors and the end of running
without interrupting the execution of the base R function lapply.
1 | fars_read_years(years)
|
years |
A vector of numbers or character strings representing years. |
This function returns a list (the same length as years) of
tibbles. NULL is returned for each input year not corresponding to a valid
dataset.
1 2 3 4 5 6 | ## Not run:
fars_read_years(2013)
fars_read_years(c("2013","2014"))
data <- 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.