Learn R Programming

provenance (version 0.2)

dist: Calculate the dissimilarity matrix between two DZdata or HMdata datasets

Description

Calculate the dissimilarity matrix between two datasets of class DZdata or HMdata using the Kolmogorov-Smirnov, Sircombe-Hazelton, Aitchison or Bray Curtis distance

Usage

dist(x, ...)

## S3 method for class 'default': dist(x, ...)

## S3 method for class 'DZdata': dist(x, metric = NULL, ...)

## S3 method for class 'HMdata': dist(x, metric = NULL, ...)

Arguments

x
an object of class DZdata or HMdata
...
optional arguments to the generic dist function
metric
(optional) either "KS", "SH", "aitchison" or "bray"

Value

  • a matrix of pairwise distances

Examples

Run this code
fname <- system.file("DZ.csv",package="provenance")
DZ <- read.DZdata(fname)
print(round(100*dist(DZ)))

Run the code above in your browser using DataLab