Nothing
Fmpd <-
function(dist.mat, my.sample){
Fmpd.sub = function(my.sub.sample){
## Get the names of species present in the
## community
com.names = names(my.sub.sample[my.sub.sample > 0])
## Calculate mpd by extracting the lower triangle
## of a phylogenetic distance matrix comprised of
## only the species in our community.
mean(as.dist(dist.mat[com.names, com.names]))
}
apply(my.sample, MARGIN = 1, Fmpd.sub)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.