make_filename: Generate FARS filename for a given year

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

make_filename() accepts a year input and returns a filename of the form "accident_[year].csv.bz2".

Usage

1
make_filename(year, internal = TRUE)

Arguments

year

Integer value representing a year. Inputs that do not coerce to integer will generate an error. The input can also be an integer vector of multiple years.

internal

Logical value indicating whether or not the package example data is used. Defaults to TRUE.

Value

Returns a string filename for each valid year, or a coercion error.

Examples

1
2
make_filename(2013)
make_filename(2013:2015)

rwpalin/fars documentation built on Nov. 5, 2019, 5:10 a.m.