fars_summarize_years: Counts the number of observations per month for given years.

Description Usage Arguments Details Value Examples

Description

This function takes multiple year numbers, reads the FARS data sets for the given years from the current working directory and counts the number of observations per month for each year. The result is a tibble with a number of columns equal to the number of years given and 12 rows, one for each month. Each cell of the tibble contains the number of observations per month and year.

Usage

1

Arguments

years

a vector of year numbers.

Details

This function uses fars_read and make_filename. These functions may throw errors, for example, if files with names for the requested FARS datasets do not exists in the current working directory.

Value

a tibble with 12 rows and a number of columns equal to the number of years given.

Examples

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

## End(Not run)

plexxx/myAssignment documentation built on May 9, 2019, 12:49 p.m.