Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rnddist

Random Distance


Description

Calculates a random distance matrix for use in null model analysis.

Usage

rnddist(size, method='metric', sat = 1.0, upper=FALSE, 
       diag=FALSE)

Arguments

size

the number of items to calculate the distances for

method

the desired properties of the matrix. Must be either ‘metric’ or ‘euclidean’

sat

a saturation coefficient to set an upper limit less than 1.0 that truncates maximum values to simulate a dissimilarity rather than a distance

upper

logical: whether to print the upper triangle (default=FALSE)

diag

logical: whether to print the diagonal (default=FALSE)

Details

Generates a matrix of size^2 uniform random numbers and passes the matrix to metrify or euclidify to ensure the metric or euclidean properties of the distances. Values are normalized to a maximum of 1.0.

Value

A dissimilarity object of class ‘dist’

Author(s)

See Also

Examples

x <- rnddist(100)
pco.x <- pco(x)
plot(pco.x)

labdsv

Ordination and Multivariate Analysis for Ecology

v2.0-1
GPL (>= 2)
Authors
David W. Roberts <droberts@montana.edu>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.