I have the following data frame:
Some background:
VAR1
is the Unique code, VAR2
is Person ID and FREQ
is Total Count.
For example, Person 1 (P1
) appears 29 times in code ABCD
, they also appear 98 times in code EFGH
. What I am trying to do, is make it so it looks like this:
Basically, I just want the total, so Person 1 has used a specific code (VAR1
) 127 times. Person 2 has used a unique code 14 times
I'm unsure how to get this to work, as I'm just starting with R.