Description Usage Arguments Details Value Examples
Reads a FARS file for a given vector of years.
1 | fars_read_years(years)
|
years |
A numeric vector of years corresponding to FARS file by year. It also accepts a charcter vector and converts to numeric. |
fars_read_years
function imports the FRAS file for a given
vector years, and it uses make_filename
to create the
correct file name associated with years
.And then imports the file using
fars_read
function, and then adds(mutates) a varaible year
. Then selects and displays
two variables MONTH
, year
.
It returns a list of data frame with two columns and where each list
is for the input years. The two columns are MONTH
and year
.
If the file for the given year is not found, it returns a list of
NULL
with a warning message of invalid year: years
.
1 2 3 | year_input<-c(2013,2014,2015)
fars_read_years(2015)
fars_read_years(year_input)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.