Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This function takes a year as an argument and uses that to construct a valid filepath to the accident dataset for that year.
1 | make_filename(year)
|
year |
The year you want to pull data from. |
For this function to work properly, a valid year must be provided.
Character strings as argument will return invalid filepaths
with NA. If you provide a year as for which no accident data is
available as the argument to this function, it will return
a filepath that may not refer to any existing file. This
will not cause an error in this function but will cause problems
if used as an argument in other functions within this package
such as fars_read
This function returns a valid filepath within your R working directory.
1 2 3 4 | make_filename(2013)
make_filename(10)
The second example will work, but the filename does not point to anything.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.