Description Usage Arguments Details Value Examples
View source: R/fars_functions.R
This function uses the mutate
and select
functions from the dplyr
package to strip
the full data frame associated with a given year, leaving only the rows associated with months and the year.
This provides a matrix of the number of rows of data from a given year, and columns of months, expressed
as an integer from 1 to 12, and the year. If a year for which data is not available is input, function
alerts user that it is an invalid year.
1 | fars_read_years(years)
|
years |
An integer representing a year that is 2013, 2014, or 2015 |
makes use of the make_filename
and fars_read
functions by generating a
filename based on the year provided, and then generating a data frame from the data associated with that
year's datafile
A table with the same number of rows as the data file associated with the year being evaluated, identifying the month associated with each datapoint
1 2 3 4 5 6 | ## Not run:
fars_read_years(2013)
fars_read_years(2014)
fars_read_years(2015)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.