I am new to this place, so I hope I'm doing things the right way.
I'm having soms trouble to summarize multiple filtergroups, and am looking for some help.
I looked at the other topics, but can't seem to find a matching one for my problem.
I have a dataset consisting of multiple columns, but the 2 important for this task are age_buyer and selling_price.
I would like to summarize for tha ages 18-35, 36-50, 51-80.
For example I made 3 groups using this code:
age_18_35 <- Dataset %>%
filter(between(age_buyer,18,35))
What I would like it to summarize for all 3 groups age_18_35, age_36_50, age_51_80, and summarize like this.
summarize(Mean=mean(selling_price), Max=max(selling_price), Min=min(selling_price))
I can do this for 1 filter, and this work perfect, but can't seem to figure out how to do this in 1 line of code for all 3? Any help would be appreciated.