⇤ ← Revision 1 as of 2007-07-04 12:43:45
466
Comment:
|
463
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
== How do I detect duplicate cases without an id number present? == |
== How do I detect duplicate cases without having an ID number? == |
How do I detect duplicate cases without having an ID number?
This example syntax detects if cases have identical values jointly on three variables, a, b and c. If a case has the same three values as an earlier case in the file then the variable copy will equal 3 (or more generally the number of variables being compared).
sort cases by a. exe. compute copy=0. exe. do repeat r=a b c. if (r eq lag(r)) copy=copy+1. end repeat. exe.