Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201839

Return name of the row with its maximum value from certain column

$
0
0

I am writing a function that has arguments of utensil but actually returns the name of the brand that sells in maximum cost using data frame below:

   utensil cost brand
1  pen     1    a
2  pencil  2    b
3  pen     5    c
4  pen     6    d
5  pencil  2    e

Viewing all articles
Browse latest Browse all 201839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>