##################################### #Load libraries ##################################### library(BiodiversityR) library(labdsv) ##################################### #Load Data ##################################### one_year<-read.csv("burn1.csv",header=TRUE,row.names="year") twenty_year<-read.csv("burn20.csv",header=TRUE,row.names="year") time<-read.csv("time.csv",header=TRUE,row.names="year") one_year_log <- disttransform(one_year, method='log') twenty_year_log <- disttransform(twenty_year, method='log') ##################################### #MANTEL test using quantitative similarity and pearson correlation ##################################### community_distance<-vegdist(one_year_log, method='bray') time_distance<-vegdist(time, method='euclidean') mantel<-mantel(time_distance, community_distance, method="pearson", permutations=1000) plot(time_distance, community_distance) mantel hist(mantel$perm) #same analysis with the 20 year burn regime community_distance<-vegdist(twenty_year_log, method='bray') time_distance<-vegdist(time, method='euclidean') mantel<-mantel(time_distance, community_distance, method="pearson", permutations=1000) plot(time_distance, community_distance) mantel hist(mantel$perm) ##################################### #MANTEL test using qualitative similarity and spearman rank correlation ##################################### community_distance<-dsvdis(one_year, index="steinhaus") time_distance<-vegdist(time, method='euclidean') mantel<-mantel(time_distance, community_distance, method="spearman", permutations=1000) plot(time_distance, community_distance) mantel hist(mantel$perm)