make_filename: Generate filename for FARS data.

Description Usage Arguments Details Value Examples

View source: R/fars_functions.R

Description

Input a year that you want to receive the FARS filename of.

Usage

1

Arguments

year

A "character" or "numeric" input that can be interpreted as an integer by the as.integer() function.

Details

Input a numeric or character object representing an integer which will then be coerced into an integer object. This integer is finally formatted into a character object of the form "accident_1234.csv.bz2" where "1234" is placeholder for the integer.

Value

A "character" object where the number

Examples

1
2
3
4
5
#setwd(system.file("data-raw", package = "wk4package"))
#returns "accident_2009.csv.bz2"
## Not run: make_filename(2009)
 #returns "accident_2012.csv.bz2"
## Not run: make_filename("2012")

SamHall14/wk4package documentation built on Dec. 18, 2021, 12:56 p.m.