mapcurves_calc {sabre}R Documentation

Mapcurves calculation

Description

It calculates the Mapcurves's goodness-of-fit (GOF)

Usage

mapcurves_calc(x, y, x_name, y_name, precision = NULL)

## S3 method for class 'sf'
mapcurves_calc(x, y, x_name, y_name, precision = NULL)

## S3 method for class 'stars'
mapcurves_calc(x, y, x_name = NULL, y_name = NULL, precision = NULL)

## S3 method for class 'SpatRaster'
mapcurves_calc(x, y, x_name = NULL, y_name = NULL, precision = NULL)

## S3 method for class 'RasterLayer'
mapcurves_calc(x, y, x_name = NULL, y_name = NULL, precision = NULL)

Arguments

x

An object of class sf with a POLYGON or MULTIPOLYGON geometry type or a spatial raster object of class RasterLayer, SpatRaster, or stars.

y

An object of class sf with a POLYGON or MULTIPOLYGON geometry type or a spatial raster object of class RasterLayer, SpatRaster, or stars.

x_name

A name of the column with regions/clusters names.

y_name

A name of the column with regions/clusters names.

precision

numeric, or object of class units with distance units (but see details); see st_as_binary for how to do this.

Value

A list with four elements:

References

Hargrove, William W., Forrest M. Hoffman, and Paul F. Hessburg. "Mapcurves: a quantitative method for comparing categorical maps." Journal of Geographical Systems 8.2 (2006): 187.

Examples

library(sf)
data("regions1")
data("regions2")

mc = mapcurves_calc(x = regions1, y = regions2, x_name = z, y_name = z)
mc

plot(mc$map1)
plot(mc$map2)

library(raster)
data("partitions1")
data("partitions2")
mc2 = mapcurves_calc(x = partitions1, y = partitions2)
mc2

plot(mc2$map1)
plot(mc2$map2)


[Package sabre version 0.4.3 Index]