I got data frame in R that looks like this:
> df
c1 c2 c3
1: 10 c1 i1
2: 10 c1 i2
3: 10 c1 i3
4: 10 c2 i1
5: 10 c2 i2
6: 10 c2 i3
7: 20 c11 i1
8: 20 c11 i2
9: 20 c11 i3
10: 20 c12 i1
11: 20 c12 i2
12: 20 c12 i3
I need to sum distinct counts of columns c2 and c3 group by c1 - to get the following result:
10 2 3
20 2 3
How would I get that done in R?
Thanks