plot.twinspan: Plot Classification Tree

plot.twinspanR Documentation

Plot Classification Tree

Description

Function displays the classification tree.

Usage

## S3 method for class 'twinspan'
plot(
  x,
  height = c("level", "chi"),
  what = c("quadrat", "species"),
  main = "Twinspan Dendrogram",
  binname = FALSE,
  ...
)

Arguments

x

twinspan result object.

height

Use either division levels ("level") or total Chi-squares of division ("chi") as heights of internal nodes in the tree.

what

Plot "quadrat" or "species" classification tree.

main

Main title of the plot.

binname

Use binary labels for classes and nodes instead of decimal numbers.

...

Other parameters passed to plot and ordilabel.

Details

The internal nodes are labelled by the numbers of division. These are the same numbers as used in summary.twinspan and returned by cut.twinspan or predict.twinspan for the same classification level. For terminal groups the plot shows the numeric code of the group and the number of items (quadrats or species) in the group. For division number k, its daughter divisions or groups are coded 2k and 2k+1. The tree is similar as a plot of as.hclust.twinspan, but adds numbers of internal nodes. The tree can be based either on the levels of hierarchy or on the heterogeneity of division as assessed by chi-square (or inertia) of the division (see as.hclust.twinspan).

See Also

summary.twinspan for similar textual presentation also showing the items (quadrats, species) in terminal groups. vegan function scores.hclust can extract the coordinates of internal (or terminal nodes), and ordilabel is used add the labels on internal nodes.

Examples


data(ahti)
tw <- twinspan(ahti)
plot(tw, what = "species")
## default plot for quadrats
plot(tw)
## plot by the heterogeneity of divisions
plot(tw, height = "chi")


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