Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This function takes a vector of numeric values and read their corresponding file names into a tibble.
1 | fars_read_years(years)
|
years |
a numeric vector containing four-digit numeric values. |
fars_read_years
first takes a numeric vector containing four-digit
elements. It then calls make_filename
to turn every elements of
years vector into a character vector of formatted file names. The file
names are used to read the corresponding date files into tibbles.
for the purpose of error handling the function callstryCatch
in order to check whether the provided file name can be evaluated and read
into tibble or not. In case an invalid year name is provided an error will
be thrown.
A list with length equal to the length of numeric vector years
in case year names are correctly provided. Elements of the list are
tibbles containing 2 columns, month and year.
1 2 3 4 | ## Not run:
fars_read_years(c(2013, 2014, 2015))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.