library(stats)
data(wetland) ## Loads species data
wetkm = kmeans(wetland, centers=3) ## Creates three clusters using kmeans
wetpt = multipatt(wetland, wetkm$cluster) ## Runs the combination analysis using IndVal.g as statistic
summary(wetpt) ## Lists those species with significant association to one combination
summary(wetpt, indvalcomp=TRUE) ## Lists those species with significant association to one combination. Includes indval components
Run the code above in your browser using DataLab