fars_read_years: Function 'fars_read_years'

Description Usage Arguments Value Examples

Description

This function takes a vector of years as input and selects values for month and year row by row.

Usage

1

Arguments

years

A vector of years. file takes the textstring from the make_filename function. lapply loops over all years and with the tryCatch statement further changes are made (see below). dat takes the data of the files from the next filename. mutate is a function of the dplyr package and in this case it selects month and year. Importing this function from the dplyr package is needed.

Value

If an invalid year is taken from the selection an error will occur and nothing is returned. Else the values month and year are returned row by row.

Examples

1
2

FunWithForest/Rpackage_fars documentation built on May 20, 2019, 8:30 a.m.