make_filename: File Naming Function

View source: R/fars_functions.R

make_filenameR Documentation

File Naming Function

Description

This function makes a FARS file name for a given year. It converts the string supplied by the user to an integer, then generates a file name for that year with the correct format. An error will be thrown if the supplied string cannot be coerced to an integer without introducing NA's.

Usage

make_filename(year)

Arguments

year

A character string giving the year for which a file name should be generated.

Value

A character string giving a file name formatted accident_X.csv.bz2 where X is the string supplied to year.

Examples

## Not run: make_filename("2010")
## Not run: make_filename("2021")


haliyan/fars.functions documentation built on May 9, 2022, 8:30 p.m.