Description Usage Arguments Details Value Examples
make_filename
makes a properly formatted FARS filename given a year
as input.
1 | make_filename(year)
|
year |
An integer, or a string or numeric that can be coerced to a string, of the year of interest. |
This function takes a year as input and produces a valid FARS filename. This function is "dumb" in that it will not check whether the file actually exists, or if the year is reasonable – you could enter any number you like.
this function returns a string that is the proper FARS data filename for the given year. Will return a filename with NA for the year slot in the name if the year parameter cannot be coerced to an integer.
1 2 3 4 5 6 7 | make_filename(year = '2013')
make_filename(year = 2013)
## Not run:
make_filename(year = 'two thousand thirteen') # error
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.