composite: create a composite matrix

Description Usage Arguments Details Value References See Also Examples

Description

provide a method to create a composite matrix from the crosstabulation of a comparison map (or map at time t) and a reference map (or map at time t+1), both aggregated at a given factor

Usage

1
composite(comp, ref, factor)

Arguments

comp

object of class RasterLayer corresponding to a comparison map (or map at time t)

ref

object of class RasterLayer corresponding to a reference map (or map at time t+1)

factor

integer. Aggregation factor expressed as number of cells in each direction (horizontally and vertically). Or two integers (horizontal and vertical aggregation factor). See raster package for details

Details

the pixel definition in a composite matrix interpretes class membership as the proportion of a pixel that belongs to a class. The pixel contains information about only the quantity of each category (Kuzera and Pontius 2008).

Value

a matrix showing the contingency table derived from the crosstabulation of a comparison map (or map at time t) and a reference map (or map at time t+1), both aggregated at a given factor. Output values are given as proportion (0 to 1)

References

Kuzera, K., Pontius Jr., R.G. 2008. Importance of matrix construction for multiple-resolution categorical map comparison. GIScience & Remote Sensing 45 (3), 249-274.

See Also

memberships

Examples

1
2
3
comp <- raster(system.file("external/comparison.rst", package="diffeR"))
ref <- raster(system.file("external/reference.rst", package="diffeR"))
composite(comp, ref, factor=2)

diffeR documentation built on May 2, 2019, 4:22 a.m.