Learn R Programming

pegas (version 1.3)

dist.hamming: Hamming Distance

Description

This function implements a general purpose Hamming distance.

Usage

dist.hamming(x)

Value

an object of class "dist".

Arguments

x

a matrix or a data frame.

Author

Emmanuel Paradis

Details

This function should work for a wide range of data types. A typical usage would be with an object of class c("haplotype", "character").

For objects of class c("haplotype", "DNAbin"), it is better to use dist.dna(x, "n") to compute the Hamming distances.

See Also

haplotype, dist.haplotype.loci