Displaying table values by fraction in R
I have a table in R , and I would like to change each row so that the numbers come in proportionally as opposed to the total.
For example if my first line is 2.2.0 I want to do this 0.5, .5.0
Likewise if the line is 4,15,1 I want to do this 0.2, 0.75, 0.05
Is there a way to do this with the entire table at once? I know this is probably pretty easy, but I've been working on it for a long time.
+3
source to share
2 answers