A method for the analysis of environmental factors controlling patterns of species composition in aquatic communities