I have been using aggregate function to determine the annual minimum in
a daily time series. However, I was also hoping to determine the date of
occurrence without having to loop through each year to identify the date
of each minimum returned from aggregate(). Is there a more convenient
way of doing so?
 
Thanks in advance,

Dave
 
library(zoo)
n <- 1000
dly <- zoo(  x = rnorm(n),   order.by = seq.Date(as.Date('1970-01-01'),
by = 'day', length.out = n)   )  
year <- as.numeric( format(index(dly), '%Y') )
annual.min <- aggregate( dly, by = year, FUN = min )


	[[alternative HTML version deleted]]

