make_filename: Create a full file name

Description Usage Arguments Value Examples

Description

This is a simple function that, creates a full filename compatible with the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System datasets. A year is taken as an input and inserted in the file name. The input year is coerced as an integer with the R function base function as.integer

Usage

1

Arguments

year

A number that represent the year of the data file to be accessed.

Value

This function returns a character vector which is formatted to correspond to a filename of a specific year's dataset. The output is printed to the console.

Examples

1
2
3
4
5
6
7
8
## Not run: 
make_filename(2013)
when<- 2013
make_filename(when)
make_filename("2013")
data <- make_filename(2013)

## End(Not run)

supervan2/Testy documentation built on May 17, 2019, 2:47 p.m.