make_filename: Print "Make Filename"

Description Usage Arguments Value References See Also Examples

View source: R/fars_functions.R

Description

make_filename creates a csv filename corresponding to tabular data for a particular year from the Fatality Analysis Reporting System (FARS) of the US National Highway Traffic Safety Administration. The filename follows standard FARS naming convention, including a "bz2"extension reflecting bzip2 compression.

Usage

1
make_filename(year, dir = "./inst/extdata")

Arguments

year

an integer or character string specifying the desired (4-digit) calendar year

dir

a character string containing the directory that contains the FARS data

Value

The function returns the name of the file (as a character string) containing FARS data for the specified year

References

https://www.nhtsa.gov/research-data/fatality-analysis-reporting-system-fars

See Also

fars_read

Examples

1
2
filename <- make_filename(2014,system.file("extdata",package="msdr3pam"))
filename <- make_filename('2014',system.file("extdata",package="msdr3pam"))

mmiesch/msdr3pam documentation built on May 18, 2019, 9:14 p.m.