make_filename: Make data file name by the year

Description Usage Arguments Value Note Examples

Description

This simple function creates filename depending on the year variable that is being provided as an input of the function. The function takes the year as a parameter of the function. The year parameter can be supplied as just a number or a string. Inside the function it will be converted as integer.

Usage

1

Arguments

year

a character string or number indicating year to create the filename

Value

The function returns a character vector containing a formatted combination of texts and parameter values year.

Note

This function uses a wrapper for the C function sprintf that takes R objects. Inside sprintf the fmt specification must include the full pathname so that the filename returned is available in the local computer.

Examples

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

## End(Not run)

mnazhasan/FarsRpkg documentation built on May 23, 2019, 5:06 a.m.