Compute functional dendogram from the ecological parameters.
Source:vignettes/functiondendo.Rmd
functiondendo.Rmd
Functional dendrograms measure functional diversity (Petchey & Gaston, 2007). The dendograms cluster species with similar traits in the same or closely linked clusters, a precursor to under the species interactions at the species-species level. In fwtraits, these interactions can be examined by providing the species’ ecological parameters or traits.
Data collation
The data was obtained from the www.freshwaterecology.info database
using the fw_fetchdata
function.
Data retrieval from the database
fishtraits <- fw_fetchdata(data = speciesdata,
ecoparams = c('rheophily habitat', 'spawning habitat',
'feeding diet adult'),
taxonomic_column = 'scientificName',
organismgroup = 'fi')
Data visualistion and compute the functional dendogram.
fdendoclust <- fw_fdendro(fwdata = fishtraits, plot = TRUE)
head(fdendoclust, 3)
#> rheophily_habitat spawning_habitat feeding_diet_adult cluster
#> Abramis brama rheophilic B euryoparous omnivorous 1
#> Alburnus alburnus eurytopic euryoparous omnivorous 1
#> Anguilla anguilla eurytopic limnoparous omnivorous 2
table(fdendoclust$cluster)
#>
#> 1 2 3 4
#> 6 6 8 1