I'm looking for R's version of Excel's "COUNTIFS" function
Scenario:
I have two columns full of values, I want to add a column that would store count of records that have same values in Col1 and Col2
It's like having to primary key split in two columns I guess
Col1 Col2 Col3 ColNew
A1 B1 EPP 2
A1 B2 EPP 1
A1 B1 EPP 2
In Excel i got it to work using below formula
=COUNTIFS(C:C,$C2,A:A,$A2,E:E,$E$2)>1
But it actually returned TRUE
or FALSE
instead of numbers
Any thoughts?