make_filename: Create a unified filename for a compressed bz2 file

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

This function allows creating a filename using a year as an input. This function is aimed to make reading files faster for the analysis of the data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System.

Usage

1

Arguments

year

an R object. Must be an integer or a character vector of length 1, containing any year

Details

The function will provide NAs in the filename if provided with an object non-coercible to an integer. The function will give errors if provided with an object with a length longer than 1.

Value

This function returns a character object

Examples

1
2
make_filename(2013)
my_df <- fars_read(make_filename(2013))

Liddlle/exmplr documentation built on May 18, 2019, 1:34 p.m.