Learn R Programming

geozoning (version 1.0.0)

sortCrit: sortCrit called by correctionTree

Description

sortCrit called by correctionTree

Usage

sortCrit(qProb, crit, cost, costL, nz, mdist, listOfZ, map, disp = 0,
  SAVE = FALSE)

Arguments

qProb

probability vector used to generate quantile values

crit

list of criteria

cost

list of costs

costL

list of per label costs

nz

list of number of zones

mdist

list of distance matrices

listOfZ

list of zoning objects

map

object returned by function genMap

disp

0: no info, 1: plot best corrected zoning

SAVE

logical value, if TRUE function returns more elements

Value

a list with components

bestcrit

best criterion value at last level

critList

criterion values at last level

costList

cost values at last level

costLList

cost per label values at last level

nzList

vector of number of zones at last level

qProb

vector of probabilities values used for quantiles

zk

(SAVE=TRUE) list of zoning objects (such as returned by calNei function), first element corresponds to initial zoning, each other element is a list with each (last if ALL=FALSE) level zoning objects

mdist

(SAVE=TRUE) list of initial distance matrix and all (last if ALL=FALSE) level distance matrices

crit

(SAVE=TRUE) list of initial criterion and all (last if ALL=FALSE) level criteria

cost

(SAVE=TRUE) list of initial cost and all (last if ALL=FALSE) level costs

costL

(SAVE=TRUE) list of initial cost per label and all (last if ALL=FALSE) level costs per label

nz

(SAVE=TRUE) list of initial number of zones and all (last if ALL=FALSE) level number of zones

Details

sort last level criteria from list of zonings, return criteria and list of zonings if SAVE=TRUE, otherwise only return last level criteria

Examples

Run this code
# NOT RUN {
data(mapTest)
qProb=c(0.4,0.7)
criti=correctionTree(qProb,mapTest)
# displays best criterion, corresponding costs and number of zones
geozoning:::sortCrit(qProb,criti$criterion,criti$cost,criti$costL,
            criti$nz,criti$mdist,criti$zk,mapTest)
# }

Run the code above in your browser using DataLab