make_filename: Generates a file name based on a year and standard pattern.

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

The function takes the argument year and casts it to an integer before inserting it within the pattern accident<year>.csv.bz2 and returning the result. If year cannot be cast to an integer then 'NA' is placed in the file name for the integer year.

Usage

1

Arguments

year

An integer value repersenting the year.

Value

This function returns a text string file name constructed from the the integer year embedded into a pattern.

Examples

1
2
3
4
5
6
## Not run: 
#' yearfile <- make_filename(current_year)
yearfile2 <- make_filename(2010)
yearfile2 <- make_filename("2010")

## End(Not run)

geogaffer/week4fars documentation built on Jan. 1, 2021, 2:18 a.m.