make_filename: Construct a filename for a dataset from the Traffic Safety...

Description Usage Arguments Value Note Examples

Description

This function constructs a filename of the type "accident_<year>.csv.bz2" which can then be passed to fars_read to be loaded in the workspace as a tibble.

Usage

1

Arguments

year

A year in %Y format, e.g., 2013. A vector of year values, e.g. 2013:2016 can also be used

Value

A filename of the type "accident_<year>.csv.bz2", where year is the input. If a vector of year values is provided, the function will return a character vector of filenames

Note

Input should either be a 4-digit integer year number in %Y format or coercible to one (e.g., a string "2013")

Examples

1
2
make_filename(2013)
make_filename(2013:2016)

ValeriVoev/VRVPackage documentation built on May 30, 2019, 9:41 p.m.