if (FALSE) {
 elbaue <- tv.veg('elbaue')
 elbaue.env <- tv.site('elbaue')
 clust <- vector('integer', nrow(elbaue.env))
 clust[elbaue.env$MGL < -50 & elbaue.env$SDGL < 50] <- 1
 clust[elbaue.env$MGL < -50 & elbaue.env$SDGL >= 50] <- 2
 clust[elbaue.env$MGL >= -50 & elbaue.env$SDGL >= 50] <- 3
 clust[elbaue.env$MGL >= -50 & elbaue.env$SDGL < 50] <- 4
 levels(clust) <- c('dry.ld','dry.hd', 'wet.hd','wet.ld')
 traits <- tv.traits()
 m <- match(rownames(st$syntab), traits$LETTERCODE, nomatch = 0)
 trait <- traits[m, c("OEK_F","OEK_N")]
 rownames(trait) <- traits$LETTERCODE[m]
 st <- syntab(elbaue, clust, mupa=TRUE)
 print(st, limit=30, trait=trait)
 #'  Manipulation of the syntaxonomic table
 sttable <- st$syntab
 sttable <- sttable[sttable$p.value < 0.05 & !is.na(sttable$p.value),
 !names(sttable) %in% c('stat')]
 taxa <- tax(rownames(sttable))
 rownames(sttable) <- taxa[match(rownames(sttable), taxa$LETTERCODE, nomatch = 0),'TaxonName']
 write.csv(sttable, 'sttable.csv')
}
Run the code above in your browser using DataLab