Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This function allows creating a filename using a year as an input. This function is aimed to make reading files faster for the analysis of the data from the US National Highway Traffic Safety Administration's Fatality Analysis Reporting System.
1 | make_filename(year)
|
year |
an R object. Must be an integer or a character vector of length 1, containing any year |
The function will provide NAs in the filename if provided with an object non-coercible to an integer. The function will give errors if provided with an object with a length longer than 1.
This function returns a character object
1 2 | make_filename(2013)
my_df <- fars_read(make_filename(2013))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.