I have a dataframe and I would like to count the number of rows within each group. I reguarly use the aggregate function to sum data as follows:
aggregate
Current best practice (tidyverse) is:
require(dplyr) df1 %>% count(Year, Month)