fars_read_years: Reads a vector of files and returns the months and years

Description Usage Arguments Details Value Warning Note Examples

View source: R/fars_functions.R

Description

The function reads a list of csv data files, specified by year, and returns a list of tibbles tibble with two columns: month and year.

Usage

1

Arguments

years

a vector of years, as integers.

Details

If any of the years leads to an inexistent file, the function throws a warning.

Value

A list of tibbles (see tibble)).

Warning

dplyr package should be attached (library(dplyr)), or the function will throw an error because it cannot find the pipe operator.

Note

The data files must be in the current working directory (see also getwd) to be found.

Examples

1
2
year_list <- fars_read_years(2013)
year_list <- fars_read_years(c(2013, 2014, 2015))

Roger-Li/farsPackage documentation built on May 25, 2019, 1:28 p.m.