image.twinspan: Image of Quadrat and Species Classification and Average...

image.twinspanR Documentation

Image of Quadrat and Species Classification and Average Abundances in Cells

Description

Function draws an image of mean pseudospecies values in cells of final quadrat and species classifications together with corresponding cluster trees.

Usage

## S3 method for class 'twinspan'
image(
  x,
  leadingspecies = FALSE,
  reorder = FALSE,
  height = c("level", "chi"),
  ...
)

Arguments

x

twinspan result object.

leadingspecies

Show averages of leading species (most abundant, ties broken by frequency) of each cluster instead of averages of all species of the group.

reorder

Do not use the original twinspan ordering of quadrats and species, but reorder the dendrograms. Setting this TRUE will use the first correspondence analysis axis to reorder the tree which often improves the diagonal structure. With this option, it is also possible to use arguments Colv and Rowv vectors to reorder the dendrogram by their values. The length of such a vector must correspond to the number of row or column classes.

height

Use either division levels ("level") or total Chi-squares of division ("chi") as heights of internal nodes in the trees boarding the image (see as.hclust.twinspan).

...

Other arguments passed to tabasco and further to heatmap.

Details

The function is based on vegan function tabasco. Mean abundances in cells are shown by colours which can be modified by the user (see tabasco). The mean abundances are either the average values of all species of the species group (default), or the average of the most abundant species of the species group (tied abundances broken by species frequency) if leadingspecies=TRUE. The species groups are rows and quadrat groups are columns. These are labelled by their decimal group numbers with information of group sizes, or species by their name if only leading species are shown. These numbers and the order of the groups are similar as in hierarchic cluster trees produced by as.hclust.twinspan and summary.twinspan. Function also adds quadrat classification tree on the top and species classification tree on the left margin (see as.hclust.twinspan). These trees show either the levels of hierarchy or the heterogeneities of divided groups depending on the argument height.

Value

Function returns invisibly the matrix of mean abundances used to produce the graph.

See Also

tabasco and heatmap for basic functionality. The default colour scheme is based on heat.colors, but better shemes can be constructed (viridis package provides clear schemes). The dendrograms are based on as.hclust.twinspan. Function twintable provides an alternative that can list all quadrats and all species in textual format.

Examples


data(ahti)
tw <- twinspan(ahti)
image(tw)
im <- image(tw, height = "chi", leading = TRUE)
## image returns invisibly data
head(im)


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