Wrapper for `cluster::daisy()`

function in `cluster`

package,
to compute distance matrix of trait between each pair of species present in
given `traits_table`

, each row represents a species and each column
a trait. To be able to compute other metrics `traits_table`

must have
species name as row names.

```
compute_dist_matrix(
traits_table,
metric = "gower",
center = FALSE,
scale = FALSE
)
```

- traits_table
a data.frame of traits with species in row and traits in columns,

**row names**should be**species names**,- metric
character vector in list

`'gower'`

,`'manhattan'`

,`'euclidean'`

defining the type of distance to use (see`cluster::daisy()`

), see Details section,- center
logical that defines if traits should be centered (only in the case of

`'euclidean'`

distance)- scale
logical that defines if traits should be scaled (only in the case of

`'euclidean'`

distance)

A functional distance matrix, **column** and **row** names follow
**species name** from `traits_table`

row names.

The functional distance matrix can be computed using any type of
distance metric. When traits are both quantitative and qualitative Gower's
(Gower, 1971; Podani, 1999) distance can be used. Otherwise, any other
distance metric (Euclidean, Manhattan, Minkowski) can be used - as long
as the rows and the columns are named following the species. When using
mixed data consider also Gower's distance extension by Pavoine et al.
(2009). **IMPORTANT NOTE**: in order to get functional rarity indices
between 0 and 1, the distance metric has to be scaled between 0 and 1.

```
J.C. (1971) A general coefficient of similarity and some of its
Gower, 871.
properties. Biometrics, 857–
J. (1999) Extending Gower’s general coefficient of similarity
Podani, 340.
to ordinal characters. Taxon, 331–
-B., Gachet, S., & Daniel, H. (2009)
Pavoine, S., Vallet, J., Dufour, A.: application for
On the challenge of treating various types of variables118, 391–402. improving the measurement of functional diversity. Oikos,
```

`cluster::daisy()`

which this function wraps, base `stats::dist()`

or `ade4::dist.ktab()`

for Pavoine et al. (2009) extension of Gower's
distance.