How can I find the pixel-wise standard deviation?
问题 I have 20 rasters with same resolution and extent. It's a time series and each raster is for one year. And I want to calculate the pixel-wise standard deviation of all rasters.So far, I am using the raster package. qq2<-list(maxras1,maxras2,maxras3,maxras4,maxras5,maxras6,maxras7,maxras8,maxras9,maxras10) qq2stack<-stack(qq2) qq2mean<-mean(qq2stack) qq2sd<-sd(qq2stack) The mean works. But standard deviation is giving me this error: Error in as.double(x) : cannot coerce type 'S4' to vector of