Diversity research using R