I have a large table in R and need to count the occurrences of the values in one of the columns, plus put the count in a column of it's own. Without aggregating.
so if I have:
var
23456
34567
45678
23456
etc
my output should be:
var count
23456 2
34567 1
45678 1
23456 2
etc
I have really read all the threads but can't seem to find a way to do this without aggregating. What I need is the equivalent of excel's count(A1:A4;A1)
.