fars_summarize_years: Shows how many FARS accidents happen in every month of given...

Description Usage Arguments Value Note Source Examples

Description

Reading FARS files from working directory with given YEARS argument into tbl_df objects which are then put into list. After reading the files dplyr with pipes(magrittr) are used to summarize how many accidents happended in each month of year.

Usage

1

Arguments

years

A vector of years, provided as integers or strings. Only those entries that are present in the FARS data provide any valid returned data.

Value

A tibble containing the count of fatalities in the FARS data for each month and year. If all of the years are absent from the FARS data a NULL value is returned.

Note

Uses make_filename(year) and fars_read(year) and fars_read_years(years) functions, and readr, dplyr and magrittr packages.

Source

Coursera, Building R Packages

Examples

1
2
## Not run: fsy<-fars_summarize_years(c(2013,2014,2015))
## Not run: fsy 

krzyklo/fars documentation built on May 19, 2019, 8:23 a.m.