fars_summarize_years: Count Accidents

Description Usage Arguments Value Note Examples

Description

This function loops through a vector of years, read them, and summarize the counts (n) for each year-month combination

Usage

1

Arguments

years

valid numeric vector representing year

Value

This function returns a tbl_df with the first column being MONTH and subsequent onces being the valid years passed into the function (Warning: Function may fail if file does not exist)

Note

function is part of an exercise in the week2 assignment of a coursera course titled, Building R Packages

function is for illustrative purposes, use with care

function assumes data is from nhtsa.gov

function assumes data can be found in the working directory

Examples

1
## Not run: fars_summarize_years(2013)

ZhangHaoquan/BuildingAnRPackage documentation built on May 8, 2019, 9:46 a.m.