functional diversity in r notes