if (FALSE) {
db <- 'elbaue'
veg <- tv.veg(db, cover.transform='sqrt', check.critical = FALSE)
site <- tv.site(db, verbose = FALSE)
#' Exclude plots with very high water level fluctuation
veg <- veg[site$SDGL < 60,]
veg <- veg[,colSums(veg) > 0]
site <- site[site$SDGL < 60,]
#' Load species trait value database
traits <- tv.traits(db)
#' Mean indicator values of Ellenberg F values
mEIV_F <- cwm(veg, trait.db = traits, ivname = 'OEK_F', method = 'mean')
plot(site$MGL, mEIV_F, xlab = 'Mean groundwater level')
#' Mode (most frequent level) of Ellenberg F values
ilevel <- cwm(veg, trait.db = traitmat, ivname = as.character(1:11), method = 'mode')
mode <- as.numeric(cwm(veg, trait.db = traits, ivname = 'OEK_F', method = 'mode'))
boxplot(site$MGL ~ mode)
}
Run the code above in your browser using DataLab