# Twinspan nefunguje devtools::install_github("jarioksa/twinspan") install.packages("twinspan", repos="https://jarioksa.github.io/drat/") ### Isopam library(isopam) library(vegan) library(cluster) # vin<-read.csv("vineyards.csv", row.names=1) summary(vin) table(colSums(vin>0)>1) vin.2<-vin[,colSums(vin>0)>1] iso.1<-isopam(sqrt(vin.2), c.max=3, l.max=3, sieve=F) plot(iso.1) iso.1$flat iso.1$flat$level.2 aa<-isotab(iso.1, level=2, phi.min = 0.3) print(aa) pco.1<-capscale(sqrt(vin.2)~1, distance = "bray", sqrt.dist = T) bb<-ordiplot(pco.1, type="n", display="si", choices=c(1,2)) points(bb, what="si", col=iso.1$flat$level.2, pch=16, cex=0.6) ordispider(pco.1, groups=iso.1$flat$level.2, pch=16, cex=0.6, col=1:4) plot(silhouette(iso.1$flat$level.2, vegdist( sqrt(vin.2), method="bray"))) ### Data Petra Hubatky iso.2<-isopam(sqrt(jedno.2), c.max=4, l.max=2, sieve=T) plot(iso.2) iso.2$flat plot(silhouette(iso.2$flat$level.2, vegdist( sqrt(jedno.2), method="bray"))) aa<-isotab(iso.2, level=2, phi.min=0.3) pco.1<-capscale(sqrt(jedno.2)~1, distance = "bray", sqrt.dist = T) bb<-ordiplot(pco.1, type="n", display="si", choices=c(1,2)) points(bb, what="si", col=iso.2$flat$level.2, pch=16, cex=0.6) ordispider(pco.1, groups=iso.2$flat$level.2, pch=16, cex=0.6, col=1:4)