fars_summarize_years: fars_summarize_years

Description Usage Arguments Details Value Examples

Description

Produce a Summary of FARS Files: number of fatalities per mounth per year.

Usage

1

Arguments

years

Vector of years' FARS files to open. Valid vector element will be integer,string or numeric that can be coerced to integer.

Details

fars_summarize_years produces a summary tibble of FARS years and months given a vector of years.

This function takes a vector of years, extract the FARS data for the corresponding years. Bind the tibbles in the data list together. the function dplyr::bind_rows() allow to combine the elements (tibbles) in dat_list with differing number of variables together to create just one combined dataset. Produce the summary of combined dataset(tribble) showing the number of observations as per combination MONTH/year. This function require a valid input argument: i.e. a valid years vector as requiered for FARS data.

Value

This function returns a summureze tibble in a wide form

Examples

1
2
3
4
## Not run: 
fars_summarize_years(years = c(2013,2014,2015))

## End(Not run)

kanga1988/kangakola_coursera_R_pkg documentation built on May 28, 2019, 2:48 p.m.