make_filename: Make FARS Filename.

Description Usage Arguments Details Value Examples

Description

make_filename makes a properly formatted FARS filename given a year as input.

Usage

1

Arguments

year

An integer, or a string or numeric that can be coerced to a string, of the year of interest.

Details

This function takes a year as input and produces a valid FARS filename. This function is "dumb" in that it will not check whether the file actually exists, or if the year is reasonable – you could enter any number you like.

Value

this function returns a string that is the proper FARS data filename for the given year. Will return a filename with NA for the year slot in the name if the year parameter cannot be coerced to an integer.

Examples

1
2
3
4
5
6
7
make_filename(year = '2013')
make_filename(year = 2013)

## Not run: 
make_filename(year = 'two thousand thirteen') #  error

## End(Not run)

Kazim1212/fars_packagebuild documentation built on May 5, 2019, 1:33 a.m.