Trucos SAS. Identificar registros duplicados

Jueves, Octubre 29th, 2009

Muy rápido, para identificar registros duplicados existen múltiples formas. Seguramente haré un monográfico sobre este tema pero de momento dejo una píldora: data aleatorio; do i=1 to 100000; id=ranpoi(23456,56781); if ranuni(5)>=0.3 then output; end; run; proc sql; create table repes (where=(rep>1)) as select id, count(id) as rep from aleatorio group by 1; quit; proc sql; create table repes (where=(rep=1)) as select id, count(id) as rep from ...