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

How to get min and max value of each year row with colnames?

$
0
0

I'm struggling with making transparent summary of minimum and maximum prices in a given year. Here is my data frame:

enter image description here

My vision was to make df with years (2006-2019), region where price was highest in each year and region where price was lowest in each year (for example: in 2018 highest price was 110 in Region 1 and lowest was 105 in Region 2), then make graph with 2 bars (lowest price and highest) for each year.


Viewing all articles
Browse latest Browse all 201839

Trending Articles



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