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 |
y |
An object of class |
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 |
Value
A list with four elements:
"map1" - the sf object containing the first map used for calculation of GOF
"map2" - the sf object containing the second map used for calculation of GOF
"ref_map" - the map used as a reference ("x" or "y")
"gof" - the Mapcurves's goodness of fit value
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)