make_filename: Create a file name for FARS annual data

Description Usage Arguments Value Note Examples

Description

This function creates a file name of the structure: accident_[YEAR].csv.bz2 given the year.

Usage

1

Arguments

year

numeric or character with a year number

Value

a character with the full file name

Note

This function will return "accident_NA.csv.bz2" and throw a warning if the year argument cannot be transoformed to integer

Examples

1
2
3
4
5
# acceptable input
make_filename(2015)
make_filename("2015")
# wrong input
make_filename("two thousand fifteen")

rafal-gl/package_coursera documentation built on May 20, 2019, 5:58 p.m.