Well, I would like a help, I have this data each column has 100%, first wanted to index from highest to lowest and then make use of the dummy variable with a value of 1 for species that add up to 50%, the rest would be zero.
Nome Dens Freq Dom
1 Abarema 9.090909 46.153846 29.411765
2 Abuta 13.636364 11.538462 23.529412
3 Agonandra 18.181818 7.692308 11.764706
4 Aiouea 22.727273 15.384615 29.411765
5 Alchorneopsis 36.363636 19.230769 5.882353
Result:
Nome Dens Freq Dom v1 v2 v3
1 Abarema 9.090909 46.153846 29.411765 0 1 1
2 Abuta 13.636364 11.538462 23.529412 0 0 0
3 Agonandra 18.181818 7.692308 11.764706 0 0 0
4 Aiouea 22.727273 15.384615 29.411765 1 0 1
5 Alchorneopsis 36.363636 19.230769 5.882353 1 1 0
If you can help me, I'm grateful.