fars_read_years: Selects the data based on 'month' an saves as separate file...

Description Usage Arguments Value Note Examples

Description

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.

Usage

1

Arguments

years

Takes number as input which will be used in formatted string literal. Would throw an error if alphabets is provided as input argument.

Value

A compressed file containing dataset for the the specified month.

Note

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.

Examples

1

mayankvanani/Farvis-R-package documentation built on May 31, 2019, 4:55 a.m.