make_filename: FARS filename producing with requested year(s)

Description Usage Arguments Details Value Examples

Description

make_filename is a simple helper function which maps a specified year to its corresponding filename in the package structure.

Usage

1

Arguments

year

An integer representing the requested datafile which belongs to the year from the package.

Details

This function is not designed for direct user interaction.

make_filename is a helper function for fars_read_years and

fars_map_state. There are no error handling.

If a NULL object entered character(0) is returned.

Value

A string representing filename which contains data for the specified year.

In case the input can not be coerced to an integer, the string "accident_NA.csv.bz2" returned.

Examples

1
2
3
4
 library(farspkg)
 make_filename("2015")
 make_filename(2014)
 

umutkahramankaptan/farspkg documentation built on May 8, 2019, 1:24 p.m.