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
6
7
8
9
# We set the working directory where the compressed files are stored within
# the package.
## Not run: 
WD0 <-getwd()
setwd(system.file("extdata", package = "fars"))
make_filename(2013)
setwd(WD0)

## End(Not run)

arnaudmilet/fars documentation built on May 26, 2019, 1:31 a.m.