fars_summarize_years: fars_summarize_years()

Description Usage Arguments Details Value Examples

View source: R/core.R

Description

This function constructs a dataframe which shows the total number of fatal accidents during several years (input), by month and year

Usage

1

Arguments

years

: a vector with calender years

Details

The function uses the packages dplyr (bind_rows, group_by, summarize) and tidyr (spread) for combining, grouping and summarizing data, and representing this

Value

a dataframe with a column 'MONTH' and columns year for each (correctly processed) year. For not correctly processed years a warning is given

Examples

1
2
3
4
fars_summarize_years(2014)
c <- fars_summarize_years(c(2015,2014))
c
c <- fars_summarize_years(c(2015,2021))

vanzanden/coursera3week4 documentation built on March 19, 2018, 3:05 a.m.