Learn R Programming

dave (version 2.0)

mxplot: Matrixplot of groups similarities

Description

This calclulates and plots average similarities of rows (releves) in a square, classified matrix. Correlation coefficient is used as similarity, upon plotting proportionas to the surface of circles. Hence, diagonal elements exhibit similarity of groups, off-diagonals all similarities to the remaining groups.

Usage

mxplot(veg, rmember, use, y=1, ...)
matrixplot(veg, rmember, use, y=1)

# S3 method for default mxplot(veg, rmember, use, y=1,...) # S3 method for mxplot plot(x,...,capacity=100)

Arguments

veg

This is a vegetation data frame, releves are rows, species columns

rmember

Group membership of the rows or columns, typically taken from cluster analysis

use

Either "rows" or "columns"

y

Transformation of species scores: x'= x exp(y)

Capacity. Adjusts plot size to the number of groups.

x

An object of class "mxplot"

capacity

The number of group symbols that fit on one page

Value

An object of class "mxplot" with at least the following items:

order

Dimension of the similarity matrix (equal to the number of groups ng)

mmatrix

The ng x ng matrix of average group similarity

levels

The ng group names (a vector of character variables)

Details

The distance measure used is "correlation used as distance". See reference.

References

Wildi, O. 2017. Data Analysis in Vegetation Ecology. 3rd ed. CABI, Oxfordshire, Boston.

Examples

Run this code
# NOT RUN {
# Starts with classifying releves by cluster analysis
dd<- vegdist(sveg^0.5,method="euclid")         # dd is distance matrix
o.clust<- hclust(dd,method="ward")             # clustering
groups<- as.factor(cutree(o.clust,k=6))        # forming 6 groups

o.mxpl<- mxplot(sveg,groups,use="rows",y=0.5)
plot(o.mxpl,capacity=30)
# }

Run the code above in your browser using DataLab