Description Usage Arguments Value Examples
This is a simple function that, creates a full filename compatible with the
US National Highway Traffic Safety Administration's Fatality Analysis
Reporting System datasets. A year is taken as an input and inserted in the
file name. The input year
is coerced as an integer with the R function
base function as.integer
1 | make_filename(year)
|
year |
A number that represent the year of the data file to be accessed. |
This function returns a character vector which is formatted to correspond to a filename of a specific year's dataset. The output is printed to the console.
1 2 3 4 5 6 7 8 | ## Not run:
make_filename(2013)
when<- 2013
make_filename(when)
make_filename("2013")
data <- make_filename(2013)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.