Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

intFun.grid.wilcox

Wilcox significance test


Description

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.

Usage

intFun.grid.wilcox(x)

Arguments

x

A raster stack object

Value

A raster object

Examples

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)

amber

Automated Model Benchmarking R Package

v1.0.3
GPL-3
Authors
Christian Seiler [cre, aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.