Good morning. I would like to subset a data frame with the amount of elements which meet a certain condition. For instance:
COLOR X Y
RED 0 1
RED 0 1
WHITE 3 1
I'd like to have another dataframe with the amount of elements who have got the same X value and the same Y value, but I don't know how to build it.
COLOR X Y AMOUNT
RED 0 1 2
WHITE 3 1 1
Thank you so much!