fars_read_years: Read and summarize data from multiple years by months

Description Usage Arguments Value Note Examples

View source: R/Cousera4.R

Description

This function takes a vector of integer values each representing a year, reads datafiles associated with each year and generates a list. Each element of the output list is a tibble with a summary of the number of observations per month per selected year.

Usage

1

Arguments

years

An integer value or a vector of integer values representing years of interest.

Value

List, each element of whch is a tibble. As a side effect, this function also prints 10 first rows of each tibble/year and the number of observations per tibble/year.

Note

Generates a warning (e.g. invalid year: 2017 if the data for a specified year does not exist in the working directory. The function still reads in all other datasets as long as their respective years are correct. For years whose data are missing, the reprective list element will be NULL.

Examples

1
## Not run: fars_read_years(c(2013,2014))

ulicheva/Coursera4 documentation built on May 3, 2019, 2:24 p.m.