I have a data frame of daily precipitation data that runs from Jan-1980 to Dec-2017. I have aggregated monthly averages (as seen in the image). How would I go about examining certain months (E.G. compare all Decembers)?enter image description here
Asked
Active
Viewed 33 times
-1
-
1Please include reproducible example, sharing code via linked screenshots it's not helpful. Have a look at [this discussion](https://stackoverflow.com/q/5963269/1655567) for some guidance for creating good examples. – Konrad Nov 04 '20 at 19:27
1 Answers
0
your could select the Decembers and draw a plot from this:
library(dplyr)
library(ggplot2)
dd.agg %>%
# filter all Decembers
dplyr::filter(mo == "12") %>%
# change name of last column
dplyr::rename(precipitation = 3) %>%
# change year to integer just in case it is char
dplyr::mutate(yr = as.integer(yr)) %>%
# order by year just in case it is unorderes
dplyr::arrange(yr) %>%
# draw a bar chart
ggplot2::ggplot(aes(x = yr, y = precipitation)) +
ggplot2::geom_col()

DPH
- 4,244
- 1
- 8
- 18