Skip to content
Prev 10120 / 29559 Next

gridded time series analysis

this is what I did to perform a regression between two bricks (each brick
represent a time series):

r <- raster(brick1)
for (i in 1:ncell(r)) { 
r[i] = lm(as.ts(cellValues(brick1, i)) ~ as.ts(cellValues(brick2,
i)))$coefficients[2]
}

The result will be a slope raster, but it really takes a lot of time, so
maybe there is a better solution..