Description Usage Arguments Value Examples
This function conducts the Wilcox two-sided significance test for two data sets that are stored in a single raster stack. The resulting raster object shows the corresponding p-value.
1 |
x |
A raster stack object |
A raster object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(raster)
# create a raster stack
for(i in 1:100)
{
data <- raster::raster(matrix(runif(100,0,1), ncol=10))
assign(paste('layer', i , sep='_'), data)
}
my.list <- lapply(ls(pattern='layer_'), get)
data <- do.call(stack, my.list)
# define a, b, and c
a <- nlayers(data)/2
b <- a+1
c <- nlayers(data)
a;b;c
# conduct two-sided Wilcox significance test
pvalue <- calc(data, intFun.grid.wilcox)
plot(pvalue); text(data, digits=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.