Description Usage Arguments Value Note Examples
This function uses base R function 'lapply' and also uses function - 'mutate', 'select' from "dplyr" package. Takes years as arguments, create a formatted string object used for naming the saved file and finally, selects the 'MONTH' and 'year' column and assigns it to "dat" object. Returns error if the "year" is not found.
1 | fars_read_years(years)
|
years |
Takes number as input which will be used in formatted string literal. Would throw an error if alphabets is provided as input argument. |
A compressed file containing dataset for the the specified month.
If the specified year is not there in the dataset, It throws a warning: "invalid year: <year>" and returns NULL. It would return NULL in case of alphbet being passed as an argument.
1 | fars_read_years(2015)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.