This is a private function which does two things:

  1. is used to check if there is an overlapping of files with multiple years. The matching between the years and the files works as follows: 1979 ... 2004 ---> 1979 - 2004 2005 ... 2008 ---> 2005 - 2014 2009 ---> 2009 2010 ---> 2010 2011 ---> 2011 ... 2018 ---> 2018

  2. it also does the sanity checking of the year(s) given

check_year(year)

Arguments

year

Year(s) vector to check.

Examples

# check_year("2018") # check_year(1979:2018) #> c(1979, 2005, 2015:2018) # check_year(2006) # check_year(1985)