#1,2 bk.veg<-read.csv2("veg.csv", row.names = 1) bk.coord<-read.csv("geo.coord.csv", row.names = 1) rownames(bk.veg)==rownames(bk.coord) summary(bk.coord) summary(bk.veg) #3 hist(bk.veg$Bromus.erectus) hist(log(bk.veg$Bromus.erectus+1)) library(vegan) hist( decostand(bk.veg$Bromus.erectus, method="standardize") ) #4 hell<-vegdist(decostand(bk.veg, method="hellinger"), method="euclidean") eucli<-vegdist(log(bk.veg+1), method="euclidean") chord<-vegdist(decostand(log(bk.veg+1), method="standardize", MARGIN=1), method="euclidean") chi<-vegdist(decostand(log(bk.veg+1), method="chi.square"), method="euclidean") bray<-vegdist(log(bk.veg+1), method="bray") #5 jacc<-vegdist(decostand(bk.veg, method="pa"), method="jacc") sor<-vegdist(decostand(bk.veg, method="pa"), method="bray") #6 mantel(eucli, chi) mantel(eucli, hell) mantel(eucli, bray) mantel(sor, bray) #7 plot(Longdeg~Latdeg, bk.coord) distances<-vegdist(bk.coord, method="euclidean") #8 mantel(distances, bray) mantel(distances, eucli)