xxxxxxxxxx
library(zoo)
as.Date(as.yearmon(yrs)) # beginning of year
as.Date(as.yearmon(yrs) + 11/12, frac = 1) # end of year
xxxxxxxxxx
as.Date(ISOdate(yrs, 1, 1)) # beginning of year
as.Date(ISOdate(yrs, 12, 31)) # end of year
xxxxxxxxxx
as.Date(paste(yrs, 1, 1, sep = "-")) # beginning of year
as.Date(paste(yrs, 12, 31, sep = "-")) # end of year