fars_summarize_years: Summarize the number of FARS incidents in each month of...

Description Usage Arguments Value Note Examples

Description

This function produces a summary data frame containing the number of FARS entries in each month of a single year or for each of several years.

Usage

1

Arguments

years

a vector of integers representing the year values to be read. Each value must correspond to a year with a CSV file in the working directory that can be read.

Value

This function returns a data frame, with rows representing calendar months and columns for each year in the input, with the total number of FARS entries in each month for the given year.

Note

This function will only return results columns for years that correspond to CSV files saved with the correct filename syntax (accident_(year).csv.bz2) in the current working directory. For any ears that do not match such a file, no column will appear in the output and the following warnign will be generated: In value[[nL]](cond) : invalid year: YYYY

Examples

1
2
## Not run: fars_summarize_years(c(2013,2014,2015))
## Not run: fars_read_years(2013)

expo45/wk4project documentation built on May 16, 2019, 9:56 a.m.