I'm trying to retrieve the top values of rowSums when applied to a data frame that is similar to the following one:
set.seed(101)
df = data.frame(descriptions = LETTERS,
col1 = round(runif(26 , min = 2, max = 250)),
col2 = round(runif(26 , min = 2, max = 250)),
col3 = round(runif(26 , min = 2, max = 250)))
The desired output is to get a data frame (lets say "top_descriptions" table ) consisting of a column with a range of values from the greater rowSums value to the minor one and a second column of the "descriptions" values.
desired output:
top_descriptions
| descriptions | row_sums |
|---|---|
| G | 553 |
| Y | 507 |
| B | 430 |
| A | 412 |
| R | 356 |
| C | 321 |
| D | 305 |
| F | 243 |
| J | 222 |
| O | 212 |
| N | 202 |
| E | 195 |
| T | 187 |
| X | 167 |
| W | 132 |
| L | 111 |
- the values shown on the table are random values only for showing the table data structure that I want.