Description Usage Arguments Details Value Examples
The function creates a filename for a .csv.bz2 file based on the year
argument in a form "accident_<year>.csv.bz2". The input is coerced to an integer.
If coercion is not possible, it shows a warning message
1 | make_filename(year)
|
year |
A vector or list indicating the years for which filenames
are to be returned. Coerced to |
Works for all input that can be coerced to integers. NA
s are
introduced with a warning if input can't be coerced. See examples for usage.
Returns a character
vector in a format "accident_<year>.csv.bz2" that
can be used as file names
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
make_filename(2006)
make_filename(2007:2010)
year_list <- list(2000, "2001", '2002')
make_filename(year_list)
# NAs introduced
make_filename("some_input")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.