如何在R中对栅格堆栈进行预白化?

时间:2019-10-31 14:52:46

标签: r raster trend

我一直在使用spatialEco包来确定趋势,p值和tau值(raster.kendal)。它的p值最高为0.2,所以想做预告。
虽然我使用kendall函数进行预发通知,但ASCII和GTIFF格式均出现错误。 (错误1)。当我选择文件而不是堆栈时,它给出了另一个错误(error2)

  1. ascidata <- list.files(path = "F:/ShareBoth/../ascii/", full.names = TRUE) length(ascidata) asciistack <- stack(ascidata) prewit <- kendall(asciistack, p.value = TRUE, prewhiten = TRUE)

  2. tifdata <- list.files(path = "F:/ShareBoth/../tif/", full.names = TRUE) length(tifdata) tifstack <- stack(tifdata) prewit <- kendall(tifstack, p.value = TRUE, prewhiten = TRUE)

给出 错误1:Error in y[!is.na(y)] : object of type 'S4' is not subsettable

  1. tifdata <- list.files(path = "F:/ShareBoth/../tif/", full.names = TRUE) length(tifdata) tifstack <- stack(tifdata) prewit <- kendall(tifstack$layer1, p.value = TRUE, prewhiten = TRUE)

它给出了第二个错误 错误2:Error in model.frame.default(formula = y ~ 1, na.action = function (object, :object is not a matrix

0 个答案:

没有答案