make_filename: Construct filename string

Description Usage Arguments Value Examples

View source: R/fars_functions.R

Description

Creates a filename, in the following format: "accident_<year>.csv.bz2", where year is a parameter.

Usage

1

Arguments

year

An integer representing the year in the FARS dataset. Non-integers are coerced to integer.

Value

Returns a filename as a character string.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# Integers or any data that can be coerced to an integer
make_filename(2000L)
make_filename(2000)
make_filename(2000.2)

# If there is a conversion problem, you get a warning and the element is replaced by NA
make_filename("This cannot be coerced to an integer")

## End(Not run)

Davidovich4/building.an.R.package documentation built on May 29, 2019, 2:08 p.m.