Why we need ungroup function while grouping more than one variable in dplyr package?



I am forming a data frame using dplyr package in R in which I am grouping data set by two variable .

grouping=group_by(pf,age,gender) #pf is the data set and age and gender are variable

Then I have created a data frame using dplyr package


I want to know why it is necessary to ungroup the data frame before arranging the data frame.


I know it’s too late but this link may help you