mxplot: Matrixplot of groups similarities

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/mxplot.R

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

1
2
3
4
5
6
7
mxplot(veg, rmember, use, y=1, ...)
matrixplot(veg, rmember, use, y=1)

## Default S3 method:
mxplot(veg, rmember, use, y=1,...)
## S3 method for class '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

Details

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

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)

Note

Plot parameter capacity only affects the format of plot. Just try.

Author(s)

Otto Wildi

References

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

Examples

1
2
3
4
5
6
7
# 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)

Example output

Loading required package: cluster
Loading required package: labdsv
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-33. For overview type 'help("mgcv-package")'.
This is labdsv 2.0-1
convert existing ordinations with as.dsvord()

Attaching package:labdsvThe following object is masked frompackage:stats:

    density

Loading required package: vegan
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-7
Loading required package: nnet

Attaching package:nnetThe following object is masked frompackage:mgcv:

    multinom

Loading required package: tree
The "ward" method has been renamed to "ward.D"; note new "ward.D2"
Call:
mxplot.default(veg = sveg, rmember = groups, use = "rows", y = 0.5)

dave documentation built on May 2, 2019, 1:30 p.m.