Description Usage Arguments Details Value
This function uses the fars_read function to read in data from a file with filename defined by using the input (year) from the user and the function make_filename. The function then uses lapply to go through each year given by the user. The mutate and select function from the dplyr package is then used to select the month and year column from the file.
1 | fars_read_years(years)
|
years |
A vector of integers that will be used by the function |
The package dplyr needs to be loaded first. If user input is not an integet and more specifically a year for which data exists the function will raise an error.
This function returns a list with the month and year columns from the file
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.