distx: Calculate distances with optional grouping and other features

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Calculate several distances and dissimilarities with optional grouping, by default columnwise and pairwise, or from an optionally specified common point.

Usage

1
2
3
4
5
6
7
8
9
distx(x, ...)

## S3 method for class 'matrix'
distx(x, method=c("euclidean", "bray-curtis", "jaccard", "mahalanobis",
  "sorensen", "difference", "maximum", "manhattan", "canberra", "binary", "minkowski"), 
  groups=NULL, p=NULL, ..., bycol=TRUE)

## S3 method for class 'biom'
distx(x, method="euclidean", groups=NULL, ..., bycol=TRUE)

Arguments

x

a matrix-like object (matrix or biom)

method

name of distance or dissimilarity measure (character)

groups

a grouping of columns/rows (character or factor)

p

a single column/row (numeric)

...

unused

bycol

compute columnwise rather than rowwise? (logical)

Details

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

Value

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

Author(s)

Daniel T. Braithwaite and Kevin P. Keegan

See Also

stats::dist, ecodist::distance

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
####  Euclidean distance between samples based on raw counts
distx (xx1)

####  alternate dissimilarity measure
distx (xx1, method="bray-curtis")

####  distance in log-transformed data
distx (transform (xx2, t_Log))

####  mean pairwise distance between biomes
distx (xx3, groups="$$biome", method="bray-curtis")

matR documentation built on May 2, 2019, 6:53 a.m.

Related to distx in matR...