stat2dist: Convert Vector to Distance

Description Usage Arguments Details Value Author(s)

View source: R/stat2dist.R

Description

This function converts a vector of distances into a distance matrix.

Usage

1
stat2dist(com, stat, diagonal = TRUE)

Arguments

com

The community matrix for which the vector of distances was calculated.

stat

One of the statistics from the ecosimu function: statistic, mean.

diagonal

A logical determining if distance matrix is square or without upper half and diagonal.

Details

The oecosimu function in vegan may be used to calculate the observed distances for a community matrix and the expected distances based on a null model, but the output is in the form of vectors. This function converts such vectors into a distance object that may be used for ordination or clustering of samples. In the oecosimu output, statistic is the observed value and mean is the expected value based on the null model.

Value

A distance matrix.

Author(s)

John Quensen


jfq3/QsNullModels documentation built on April 6, 2020, 2:06 p.m.