How to obtain Dates of annual maximum gridcell values of rasterbrick?

随声附和 提交于 2019-12-02 11:42:07

You can do

wmax <- stackApply(r.dt, indices = indices, fun=function(i,...) which.max(i))

to get the indices that refer to the Date vector

To get (integer) date representations, i.e., the number of days since 1970-01-01, you could do something like this, for each year

m2000 = data.frame(from=1:3, to=as.integer(Date_val)[1:3])
x <- subs(wmax[[1]], m2000)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!