Description Usage Arguments Value Examples
View source: R/fars_functions3.R
fars_read_years
function allows to read a vector of years
the function uses the lapply function and the two functions created above
to create a new csv filename for each year and then test if the filename exists
then by using the dplyr package only 2 columns will be visible: month and year
if the year is invalid, it will return "NULL"
1 | fars_read_years(years)
|
years |
A vector of years to be read |
returns a list of dataframes with pnly the month and year columns
1 2 | fars_read_years(c(2013,2014))
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.