Functions used to analyse trait diversity in ecological communities using species abundance, trait data and environmental data.