require(ade4)
data(duneFVG)
data(duneFVG.tr8)
tr8_N<-duneFVG.tr8$traits.tot[,c(1,3,4)]
tr8_D<-data.frame(duneFVG.tr8$traits.tot[,2])
tr8_Q<-duneFVG.tr8$traits.tot[,5:15]
tr8dist<-dist.ktab(ktab.list.df(list(tr8_N,tr8_D,tr8_Q)),type=c('N','D','Q'))
tr8dist<-cailliez(tr8dist)
## Rarefaction
rare<-rao_permuted(duneFVG$alien,tr8dist)
plot(rare$Rao, ylab="Rao QE", xlab="Number of plots", type="l", ylim=range(rare))
lines(rare[,2], lty=2)
lines(rare[,3], lty=2)
Run the code above in your browser using DataLab