plausibilityTest: plausibilityTest

Description Usage Arguments Details Value Examples

View source: R/plausibilityTest.R

Description

Quantifies and plots the distribution of pixels within a mask over a reference categorical raster object.

Usage

1
plausibilityTest(x, y, class.labels = NULL)

Arguments

x

Object of class RasterLayer and RasterStack.

y

Object of class RasterLayer.

class.labels

Labels of classes in y provided as a character vector.

Details

For each lazer in x, (e.g. classification mask) the function returns the absolute and relative count of non-NA pixels within each unique value of y (e.g. land cover map). Then, the results for each layer are compared in a combined plot. The output of the function is a list consisting of:

Value

A list.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
{

 require(raster)

 # load example probability image
 file <- system.file('extdata', 'probabilities.tif', package="rsMove")
 p <- raster(file) > 0.5

 # land cover map
 lc <- raster(system.file('extdata', 'landCover.tif', package="rsMove"))

 # segment probabilities
 pt <- plausibilityTest(p, lc)

 # show plot
 pt$relative.plot

 # see relative sample count
 head(pt$relative.count)

}

RRemelgado/rsMove documentation built on June 7, 2020, 5:12 p.m.