Compute Rao's entropy index (Rao's Q)

## Arguments

- traits
The matrix dataset for which you want to compute the index

- sp_com
Site-species matrix with sites as rows and species as columns if not provided, the function considers all species with equal abundance in a single site. This can be either a

`matrix`

, a`data.frame`

, or a`Matrix::Matrix()`

object.- dist_matrix
A dissimilarity matrix that can be provided instead of a trait data.frame (default:

`NULL`

). This can be either a`matrix`

, a`data.frame`

, or a`Matrix::Matrix()`

object.

## Value

a data.frame with two columns:

`site`

the names of the sites as the row names of the input`sp_com`

,`Q`

the values of Rao's quadratic entropy at each site.

NB: Rao's quadratic entropy is 0 when there are no species in the site.

## References

Pavoine S., Dolédec S. (2005). The apportionment of quadratic entropy: a useful alternative for partitioning diversity in ecological data. Environmental and Ecological Statistics, 12(2), 125–138. doi: 10.1007/s10651-005-1037-2

## Examples

```
data(traits_birds)
fd_raoq(traits_birds)
#> site Q
#> 1 s1 170.0519
```