Description Usage Arguments Details Value References See Also Examples
View source: R/categorySourcesPlot.R
If comparison and reference (raster) maps are provided, this function creates the Category Sources plot from the comparison between the comparison map (or map at time t) and the reference map (or map at time t+1). If a square contingency table (matrix) is provided instead of raster maps, then this function creates the Category Sources plot from the comparison between the comparison variable (or variable at time t) and the reference variable (or variable at time t+1).
1 2 3 
comp 
object of class RasterLayer corresponding to a comparison map (or map at time t). See Details below 
ref 
object of class RasterLayer corresponding to a reference map (or map at time t+1). See Details below 
ctmatrix 
matrix representing a square contingency table between a comparison variable or variable at time t (rows) and a reference variable or variable at time t+1 (columns). See Details below 
analysis 
character string indicating type of analysis, either "error" (default) or "change" 
units 
optional; character string indicating units of 
population 
optional; an n x 2 matrix provided to correct the sample count to population count in the square contingency table. See Details below 
fontSize 
text size (in pts) 
breaks 
One of:

labels 
One of:

limits 
A numeric vector of length two providing limits of the scale.
Use 
Users may enter as input either a square contingency table (ctmatrix
) or a comparison and a reference raster maps (comp
and ref
, respectively).
The first column of population
must contain integer identifiers of each category, corresponding to the categories in the comparison and reference variables. The second column corresponds to the population totals for each category.
a stacked barplot showing for each category the agreement and the omission and comission components of difference between the comparison map/variable (or map/variable at time t) and the reference map/variable (or map/variable at time t+1)
Pontius Jr., R.G., Millones, M. 2011. Death to Kappa: birth of quantity disagreement and allocation disagreement for accuracy assessment. International Journal of Remote Sensing 32 (15), 44074429.
1 2 3 4 5 6  comp < raster(system.file("external/comparison.rst", package="diffeR"))
ref < raster(system.file("external/reference.rst", package="diffeR"))
categorySourcesPlot(comp, ref)
ctmat < crosstabm(comp, ref)
categorySourcesPlot(ctmatrix = ctmat, units = "Pixels")

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.