1
Hello, I’m having a question to structure a chart in R.
My intention is to use a grouped bar chart, with a moving midline above it.
The chart I have is this:
I would like the moving average for each of the points (P1 to P9) to be related to each of the three collections cited in the legend, in order to be similar to the following figure:
This is the data I have:
P1 P2 P3 P4 P5 P6 P7 P8 P9
coleta_1 = 0.73, 0.90, 1.24, 1.18, 0.79, 0.84, 0.51, 0.90, 0.67
coleta_2 = 2.44, 2.50, 1.26, 1.80, 2.05, 2.78, 1.05, 1.57, 1.85
coleta_3 = 1.04, 2.08, 1.08, 1.04, 0.65, 0.73, 1.56, 0.53, 1.24
Basically each index of the above strings is a collection point. That is, 0.73 , 2.44 and 1.04 are P1, while 0.90 , 2.50 , 2.08 are P2 and so on.
How could I do it? Thank you for the availability!
For "moving average" means the average of the three collections in each
P
?– Rui Barradas