fars_summarize_years: Read and summarize datasets

Description Usage Arguments Value Examples

View source: R/functions.R

Description

This function reads month and year columns in more than one datasets in working directory at once, merges them and summarize their count with respect to year and month. It aimed to summarize datasets especially from US National Highway Traffic Safety Administration's Fatality Analysis Reporting System.

Usage

1

Arguments

years

A numeric vector of which year's datasets should be summarized.

Value

This function returns a dataframe with at leat two columns, month and year columns which are inputs. Year columns have same names as input and includes observation numbers per month. If input is not a integer or a class which can be coerced to integer this function can not create appropriate file name and can not read relevant datasets and gives error like "warning("invalid year: ", year)".

Examples

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

## End(Not run)

badalovi/pfars2 documentation built on April 24, 2020, 9:44 p.m.