The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
The fwtraits access the freshwaterecology.info database that contains several ecological parameters, traits and indicators used in biogeographical modeling, fuunctional diversity and taxonomic assessments, and ecological monitoring. These are grouped based on the taxonomic groups, including macroinvertebrates, fishes, phytoplankton, phytobenthos, and macrophytes. Therefore, in this workflow we demonstrated the use of ecological parameters from the database in assessing functional diversity.
NOTE
set.seed(1135)
sites1 <- rep(c("A","B", "C", "D", "E"), c(7,10, 8, 13, 4))
mv <- c("Margaritifera margaritifera","Pseudunio auricularius","Musculium lacustre",
"Musculium transversum","Corbicula fluminea","Congeria leucophaeata",
"Dreissena polymorpha", "Dreissena rostriformis bugensis",
"Parastenocaris germaica", "Branchiobdella balcanica",
"Branchiobdella hexadonta","Branchiobdella parasita","Branchiobdella pentadonta")
sp <- c(sample(mv, 7), sample(mv, 10),sample(mv, 8),sample(mv, 13),sample(mv, 4))
abun <- rnorm(length(sp), 1.3, 0.12)
macrodf <- data.frame(sites = sites1, species = sp, abund = abun)We considered two ecological references for macroinvertebrate species: stream zonation preference and feeding type. These were selected because most species have records, reducing missing values that might have required imputation.
It should be noted that imputing for missing traits is outside the scope of this package. So, species that do not have records were dropped when computing the functional diversity indices or community weighted means.
traitsdf <- fw_fetchdata(data = macrodf,
organismgroup = 'mi',
taxonomic_column = 'species',
ecoparams = c("stream zonation preference", "feeding type"),
inform = FALSE)These are computed by setting
FD to TRUE and abund
parameter must be provided. They the indices are computed using the
FD package (Laliberté & Legendre 2010). The indices
tested included Functional richness (FRic), species richness (SRic),
Functional evenness (FEve), Functional diversity (FDiv), Funtional
dispersion (FDis), and Rao quotient (Rao Q).
#fd indices calculated when abundance is provided.
fdindices <- fw_fdcompute(fwdata = traitsdf,
sitesdata = macrodf,
sites = 'sites',
species = 'species',
abund = 'abund',
FD = TRUE)
#functional richness only: when abundance is not provided.
fdric<- fw_fdcompute(fwdata = traitsdf,
sitesdata = macrodf,
sites = 'sites',
species = 'species',
FD = TRUE)
df <- fdindices |> tidyr::gather('fdind', "vals", -site)
ggplot(data = df, aes(site, vals, fill = fdind))+
geom_bar(stat = 'identity')+
scale_fill_viridis_d()+
theme(legend.position = "none")+
facet_wrap(~fdind, scales ='free_y')+
labs(x='sites', y='FD indices')
#Functional richness
dffric <- fdric |> tidyr::gather('fdind', "vals", -site)
ggplot(data = dffric, aes(site, vals, fill = fdind))+
geom_bar(stat = 'identity')+
scale_fill_viridis_d()+
theme(legend.position = "none")+
facet_wrap(~fdind, scales ='free_y')+
labs(x='Sites', y='FD indices')
Community weighted means measures how traits vary with environmental change (Guy-Haim & Bouchet 2025).
Laliberté, E., & Legendre, P. (2010). A distance‐based framework for measuring functional diversity from multiple traits. Ecology, 91(1), 299-305.
Guy-Haim, T., & Bouchet, V. M. (2025). Beyond taxonomy: A framework for biological trait analysis to assess the functional structure of benthic foraminiferal communities. Marine Pollution Bulletin, 213, 117699.
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.