matchCount: Counts distinct pixel pairs in CDL raster images

View source: R/matchCount.R

matchCountR Documentation

Counts distinct pixel pairs in CDL raster images

Description

matchCount counts distinct pixel pairs for CDL raster images with same extents and resolution.

Usage

matchCount(x, y, m = 256)

Arguments

x

A CDL raster image.

y

A CDL raster image.

m

A bound for the max enumeration of CDL categories. The default is 256.

Value

A matrix with pixel counts by unique ordered CDL crop pairs in x and y.

Author(s)

Jonathan Lisic, jlisic@gmail.com

Examples

## Not run: 
z1 <- matrix( rep(c(1,4),8), nrow=4) 
z2 <- matrix( rep(c(1:4),4), nrow=4) 

r1 <- raster(z1)
r2 <- raster(z2)

a <- matchCount(r1,r2)

## End(Not run)

jlisic/cdlTools documentation built on March 28, 2024, 4:28 a.m.