Generates a sparse community matrix as input for clustering regions based on the similairity of functional traits across species.
Arguments
- x
A community data in long format with one column representing sites labeled “grids” and another column representing species labeled “species”.
- trait
A data frame or matrix object with the first column labeled “species” containing the taxonomic groups to be evaluated whereas the remaining columns have the various functional traits. The variables must be a mix of numeric and categorical values.
- cut
The slice time.
- phy
is a dated phylogenetic tree with branch lengths stored as a phylo object (as in the ape package).
- bin
The desired number of clusters or bins.
- na.rm
Logical, whether NA values should be removed or not.
