Description Usage Arguments Details Value Note Author(s) Examples
detects correlation of RasterLayers in a RasterStack
1 | detct_RstCor(Stk, THvalue, returnCorTab = FALSE)
|
Stk |
a RasterStack |
THvalue |
numeric as 0.X - threshold value for correlation value of correlating layers to drop correlating layers (see details). |
returnCorTab |
boolean - to return either the cleaned RasterStack (FALSE) or to return the correlation table (TRUE); default= FALSE |
This function is used to test a RasterStack on the correlation of the RasterLayers. All RasterLayers which have a higher correlation value than 'THvalue' will be dropped from the RasterStack. E.g. if THvalue=0.9 all RasterLayers with correlation values >0.9 and < -0.9 will be dropped.
returns a RasterStack with the layers correlating less than the treshold value.
To perform a correlation test all values are cleaned of INF and/or NA values.
The output RasterStack is NOT cleaned from INF and/or NA values.
Andreas Schönberg
1 2 3 4 5 6 7 8 9 10 11 | ### load data to compute RGB Indices
extpath <-system.file("extdata","lau_mspec.tif",package = "LEGION")
mspec <- raster::stack(extpath)
names(mspec)<- c("blue","green","red","nir")
### compute all vegetation indizes
x <-LEGION::vegInd_RGB(exp_rgb,3,2,1)
# perform Cor Test
y <- detct_RstCor(x,0.7)
names(y)
# to return the Correlation Matrix
z <- detct_RstCor(x,0.7,returnCorTab=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.