make_filename: Expected Filename Creator

Description Usage Arguments Details Value Examples

Description

This function takes a number as an input and creates the predicted filename for the data file that should contain the corresponding year's Fatality Analysis Reporting System data

Usage

1

Arguments

year

this parameter takes a number as integer and in order to create that year's expected filename

Details

Function expects to get number of a year in the YYYY format. Even though it can coerce double numbers to integers and accept invalid numbers as an input, any number that is not one of the years FARS data contains would result in an error. The function also operates with the asumption that the file names contained in the data folders are not changed.

Value

Function returns a string that should be same as the name of the desired datafile

Examples

1
2
3
4
## Not run: 
make_filename(2014)
make_filename(2015) 
## End(Not run)

LapsedPacifistROU/FARSAssignment documentation built on May 7, 2019, 3:12 p.m.