Hi all,
I have this kind of dataset,
What I would like it's to each interval and different date inside each interval, have the average depth and the average value, so like have just one line per date with average depth and value, and this for all the different date in all different interval.
df<- tribble(
~Interval, ~Value, ~Depth, ~Date
1, -96.14, 10, 20211013
1, -94.62, 20, 20211013
1, -92.41, 30, 20211014
1, -91.27, 40, 20211014
2, -84.14, 50, 20211017
2, -74.91, 60, 20211017
2, -72.61, 70, 20211017
2, -69.74, 80, 20211018
2, -69.73, 90, 20211018
3, -73.83, 100,20211019
3, -77.27, 110,20211019
3, -79.79, 120,20211019
3, -80.89, 130,20211020
3, -82.44, 140,20211020
4, -82.43, 150,20211023
4, -80.94, 160,20211023
4, -80.11 170,20211025
4, -78.18, 180,20211025
How can I do that ?
Thanks a lot