misclassified: Report Misclassified Quadrats

misclassifiedR Documentation

Report Misclassified Quadrats

Description

twinspan bases its quadrat classification primarily on ordination axis. In some cases this is in conflict with the classification derived from indicator pseudospecies. This function identifies these cases.

Usage

misclassified(x, level, verbose = TRUE, binname = FALSE)

Arguments

x

twinspan result object.

level

Only consider misclassification down to this level.

verbose

If FALSE, returns only the index of misclassified quadrats.

binname

Use binary labels instead of decimal numbers for classes and divergent division in verbose object.

Details

The function compares the final twinspan classification (from cut.twinspan) and the classification predicted from indicator pseudospecies (from predict.twinspan). If these two differ, the quadrat is “misclassified”. With verbose=FALSE, the function returns a logical vector that is TRUE for misclassified quadrats. In default, it also returns the names, twinspan classes and predicted classes of misclassified quadrats, and the division where the misclassification occurred and classifications diverged. The divisions and their numbers can be seen in summary.twinspan and plot.twinspan.

Value

If verbose=TRUE, the function returns an object of class "misclassified" with following elements.

index

Index of misclassified quadrats.

labels

Labels (names) of quadrats.

class

Final classification from twinspan.

predicted

Final classification from predict.twinspan.

division

The division where the misclassification occurred.

With verbose=FALSE, the function returns a logical vector that is TRUE for misclassified quadrats.

See Also

The basic functions are cut.twinspan and predict.twinspan. You can see the division numbers with summary.twinspan (with indicator pseudospecies) and in plot.twinspan.

Examples


data(ahti)
tw <- twinspan(ahti)
misclassified(tw)
## see the ID numbers of divisions
plot(tw)
## only look at misclassifications at first two levels
misclassified(tw, level = 2)


jarioksa/twinspan documentation built on Nov. 23, 2024, 2:49 p.m.