How to find average rain in a month

In the dataset, I have rain per day. I have different columns (state, city, year, month, day and average rain per day.

I need to find the average rain in a month in Washington.

I use filter function and but I am stuck to find the average rain in a month.

You probably want summarize(), but we can give better advice if you show us a simple example of what you've already done.

Thank you for your answer. Yes, first I tried summarize, it did not work out. Maybe I did mistake. So, here is my code

arlington_monthly_rain %>% group_by(year) %>% group_by(month) %>% ….. So I stuck at the end of this code. I need to write a code to give me the average monthly rain, I have data average daily rain.

If by average by month you mean, for example, all days every January, then you probably don't want to group by year. Perhaps also show us the code including your filter() and summarize() statements.

I think I need to use the group(year) because, my data starts in 2010 till today. I plan to group the year and then month and find average monthly rain. I only have the above code related to the rain part.

Possibly try group(year,month)

You may also find FAQ: How to do a minimal reproducible example ( reprex ) for beginners to be a helpful guide.

Thank you.

I figured out myself using aggregate function.