fars_summarize_years: Creates a data frame that contains number of records...

Description Usage Arguments Details Value See Also Examples

View source: R/fars_summarize_years.R

Description

fars_summarize_years takes a numerical vector representing the years in the data that should be included in the data frame output. For this function to work, data should be in .csv.bz2 format located in the same directory as the working directory. In case the data for a particular year is unavailable, the function will show an error message for the year that was not available.

Usage

1

Arguments

years

A numerical vector indicating which years to include in the output dataframe.

Details

If you have a file from FARS that is in .csv format but not in .csv.bz2 format, you can convert it to .csv.bz2 format by using the write.csv function in R. See vignette "Other functions in readFARS".

Value

A data frame with the variables MONTH and each year where data is avaiable, summarizing the number of observations recorded each month per year.

See Also

make_filename

fars_read_years

Examples

1
2
fars_summarize_years(c(2013, 2014, 2015))
## Not run: fars_summarize_years(c(2013, 2014, "nineteen ninety two"))

DocOfi/FARSread-Package documentation built on May 21, 2019, 3:07 a.m.