decyear2date(c(1996.001, 1999.999, 2004.162, 2005.162))
z = c(1,2,3,5,10) # 5 depths
x = matrix(rnorm(30), nrow = 5) # 6 variables at 5 depths
layerMean(cbind(z, x))
leapYear(seq(1500, 2000, 100))
leapYear(c(1996.9, 1997))
monthNum(as.Date(c('2007-03-17', '2003-06-01')))
y = Sys.time()
years(y)
Run the code above in your browser using DataLab