this is my data
ABC A 9 1 0 B 2 2 2 C 3 3 3
I want to get a percentage of each row
my waiting data
ABC A 0.9 0.1 0 B 0.33 0.33 0.33 C 0.33 0.33 0.33
I made my data with "dcast", and there is a column name on A, B and C. Therefore, actually my real data
Name ABC 1 A 0.9 0.1 0 2 B 0.33 0.33 0.33 3 C 0.33 0.33 0.33
source share