ape (version 1.9-2)

weight.taxo: Pairwise Distances from a Taxonomic Level

Description

This function computes the pairwise distances between the pairs of data in an alpha numeric vector. This vector contains taxonomic data, either as a full description (for instance 'animal' and 'vegetal') or as a code (for instance '0' and '1'). This function is useful for drawing correlograms.

Usage

weight.taxo(x)

Arguments

x
a vector describing a taxonomic level

Value

  • a square matrix of size length(x).

Details

The matrix $m_{i,j}$ will be:
  1. 0 if$i=j$;
  2. 0 if$i \neq j$and$x_i \neq x_j$;
  3. 1 if$i \neq j$and$x_i = x_j$.

See Also

Moran.I for example of use