make_filename: Making FARS filenames from given YEAR

Description Usage Arguments Value Note Source Examples

Description

Replacing percent %d with year (given as input parameter) in string "accident_%d.csv.bz2"

Usage

1

Arguments

year

A vector of years, provided as integers (1984) or strings ("1984", "2001"). Do not provide R 'Date' objects or shortened suffixes (eg 84) for a year.

Value

A vector of FARS filenames.

Note

Year is converted to integer internally. We don't need to export it, as it's use case is mainly in functions from package

Source

Coursera, Building R Packages

Examples

1
make_filename(c(2012,2013)) #[1] "accident_2012.csv.bz2" "accident_2013.csv.bz2"

krzyklo/fars documentation built on May 19, 2019, 8:23 a.m.