[R] categorizing data

Janet Choate j@c@eco @end|ng |rom gm@||@com
Sun May 29 21:28:55 CEST 2022

Hi R community,
I have a data frame with three variables, where each row adds up to 90.
I want to assign a category of low, medium, or high to the values in each
row - where the lowest value per row will be set to 10, the medium value
set to 30, and the high value set to 50 - so each row still adds up to 90.

For example:
Data: Orig
tree  shrub  grass
32     11       47
23      41      26
49      23      18

Data: New
tree  shrub  grass
30      10      50
10       50     30
50       30     10

I am not attaching any code here as I have not been able to write anything
effective! appreciate help with this!
thank you,


	[[alternative HTML version deleted]]

More information about the R-help mailing list