Displaying 1 result from an estimated 1 matches for "idq15".
Did you mean:
id15
2012 Feb 14
1
cumsum function to determine plankton phenology
...c_pheno[,2])
# start the series
datayear<-data[format(data$date,"%Y")==1984,]
# calculate cumulative sum
datayear$cumsum<-cumsum(datayear$sp)
# calculate cumsum standardised
datayear$cumsum<-cumsum(datayear$sp)/max(cumsum(datayear$sp))
# take index of minimum value of cumsum
idq15<-which.min(mean(.15-datayear$cumsum))
idq50<-which.min(mean(.50-datayear$cumsum))
idq85<-which.min(mean(.85-datayear$cumsum))
#take corresponding date
dateq15<-datayear$date[idq15]
dateq50<-datayear$date[idq50]
dateq85<-datayear$date[idq85]
# output results in day in year...