I'd like some help to construct a distinct count of a data frame. Here are the data:
Filial Matrícula Valor
ABC 100 R$ 500,00
XYZ 200 R$ 850,00
XYZ 100 R$ 320,00
JCT 300 R$ 512,00
JCT 300 R$ 98,00
ABC 300 R$ 1.012,00
I would like R to give me the consolidated showing the distinct count of the "Registration" column as well as the sum of the "Value" column. Similar to what the Excel PivotTable already does. The result I want is:
Filial Contagem/Matricula Valor
ABC 2 R$ 1.512,00
JCT 1 R$ 610,00
XYZ 2 R$ 1.170,00