I have data read from csv file in R language, then I want to calculate frequency of items based on conditions on two or more columns.
a aaa 12
b bbb 2
c ccc 10
a aaa 23
a abb 13
b bcc 23
b bbb 5
c cbb 73
i want the output in below format with condition if column 1 is equal to 'a' and column 2 is equal to 'aaa' then count for a, same for b and c.
output:
a 2
b 2
c 1