Description Usage Arguments Value Note Examples
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.
1 | make_filename(year)
|
year |
a character string or number indicating year to create the filename |
The function returns a character vector containing a formatted
combination of texts and parameter values year
.
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.
1 2 3 4 | ## Not run:
make_filename(2013)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.