Here are functions for sampling genes and species in neutral communities ! This is an adaptation translation in the R programming language of the Java routines I used in my publication about SGDC in neutral communities (A Neutral Theory for Interpreting Correlations between Species and Genetic Diversity in Communities; doi : 10.1086/678990).
Here is the R code: [SRC]
and here is some documentation about it: [PDF]