# weight.taxo

From ape v5.4
by Emmanuel Paradis

##### Define Similarity Matrix

`weight.taxo`

computes a matrix whose entries [i, j] are set to 1
if x[i] == x[j], 0 otherwise.

`weight.taxo2`

computes a matrix whose entries [i, j] are set to 1
if x[i] == x[j] AND y[i] != y[j], 0 otherwise.

The diagonal [i, i] is always set to 0.

The returned matrix can be used as a weight matrix in
`Moran.I`

. `x`

and `y`

may be vectors of
factors.

See further details in `vignette("MoranI")`

.

- Keywords
- manip

##### Usage

```
weight.taxo(x)
weight.taxo2(x, y)
```

##### Arguments

- x, y
a vector or a factor.

##### Value

a square numeric matrix.

##### See Also

*Documentation reproduced from package ape, version 5.4, License: GPL-2 | GPL-3*

### Community examples

Looks like there are no examples yet.