Description Usage Arguments Details Value Examples
The fars_read_years()
function is used to read in FARS data for a specified range of years.
1 | fars_read_years(years)
|
years |
A year or a vector of years (in any class that can be coerced to numeric) to specify which FARS reports are to be read in |
The function internally uses the make_filename
function to create standardised file
names from the years
input. It then reads in CSV files from the working directory that
correspond to this standardised file name and uses dplyr
functions to reorganise the
data.
This function returns a list of FARS data where every list entry contains the data
for one of the years specified in form of a tbl_df
. The data frame has one
line for every data point in the respective FARS data set and indicates the month
and the year for this data point.
It produces an error warning if an invalid year is given as input.
1 | ## Not run: fars_read_years(c(2014, 2015)) #Read in FARS data for 2014 and 2015
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.