Hi, Having an zoo object I can subset it to obtain the days where I have the values within some range:
is.zoo(z) TRUE subset(z[,1], z[,1]>=5 & z[,1]<= 10) #Yields: Year(day) 1988(13) 1988(14) 1988(16) 1988(20) 1988(21) 1988(22) 1988(25) 1988(26) 7.973946 9.933518 7.978227 7.512960 6.641862 5.667780 5.721358 6.863729 1988(27) 1988(28) 1988(29) 1988(30) 1988(32) 1988(33) 1988(34) 1988(35) 9.600000 9.049846 9.213438 6.412746 5.543606 7.881596 6.373102 7.220562 .................................................................................................................. .................................................................................................................. How do I could refine the search in order to obtain those consecutive days within a specific range? In the above extract: 1988(26) 1988(27) 1988(28) 1988(29) 1988(30) 1988(33) 1988(34) 1988(35) 6.863729 9.600000 9.049846 9.213438 6.412746 7.881596 6.373102 7.220562 Best regards, Antonio ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.