if (FALSE) {
if(require(ade4)){
data(aviurba, package="ade4")
# Trait-based distances between bird species:
distances<-dist.ktab(ktab.list.df(list(aviurba$traits)), type = "N")
# The distances should be squared Euclidean;
# note that Euclidean distances can be used
# as they also are squared Euclidean.
# Species abundances in sites
abundances<- aviurba$fau
# Rarefaction of functional diversity
rare_Rao(abundances, distances, sim = TRUE, resampling = 100)
rare_Rao(abundances, distances, sim = FALSE)
}
}
Run the code above in your browser using DataLab