make_filename: make_filename.

Description Usage Arguments Details Value Examples

Description

make_filename makes a file name by adding the given year as per FARS filename standard

Usage

1

Arguments

year

An integer,a string or a numeric data type that can be coerced to an integer But this function can be improve by adding argument validation test, that will check if the input argument can be coerce to integer. If yes continue with coercion. Else ,request the users to provide a valid input argument.

Details

This function takes a year as input argument and produces a valid FARS filename as output. in this format: "accident_" + year + ".csb.bz2"

Value

this function returns a string that is the proper FARS data filename for the given year. An erronous file name can be produce the param year was not validate.

Examples

1
2
3
4
## Not run: 
make_filename(2013)

## End(Not run)

kanga1988/kangakola_coursera_R_pkg documentation built on May 28, 2019, 2:48 p.m.