demo/diffMetrics.R

ref <- rast(system.file("external/reference.rst", package = "diffeR"))
comp <- rast(system.file("external/comparison.rst", package = "diffeR"))

# Crosstab matrix, total difference, quantity difference and allocation difference at the map level:
(ctmatCompRef <- crosstabm(comp, ref, percent = TRUE)) 

# 
diffTablej(ctmatCompRef)

# 
exchangeDij(ctmatCompRef)

# 
(diffMR <- differenceMR(comp, ref, eval = "original"))

#
overallComponentsPlot(comp, ref)

Try the diffeR package in your browser

Any scripts or data that you put into this service are public.

diffeR documentation built on Aug. 22, 2023, 9:11 a.m.