make_filename: Creates a string filename based on a specific year.

Description Usage Arguments Value Warning Examples

View source: R/fars_functions.R

Description

It creates a data filename string using the format of the US National Highway Traffic Safety Administration in the Fatality Analysis Reporting System for a specific year.

Usage

1

Arguments

year

A numeric vector representing the years in a time period.

Value

A character vector corresponding to the data filenames specified in the time period.

Warning

If the year parameter cannot be coerced as an integer, the function will throw a warning that the information will not be read.

Examples

1
2
3
4
5
# We set the working directory where the compressed files are stored within
# the package.
WD <- setwd(system.file("extdata", package = "rfars"))
make_filename(2013)
setwd(WD)

Cesar-Urteaga/rfars documentation built on May 27, 2019, 7:28 a.m.