Wonderful it worked like a charm.
Thank you again.
MG
Sent: Monday, February 25, 2019 at 3:20 PM
From: "Alan Mead" <am...@alanmead.org>
To: "Matteo Ga" <matteo.galv...@mail.com>, pspp-users@gnu.org
Subject: Re: find duplicate in dataset
From: "Alan Mead" <am...@alanmead.org>
To: "Matteo Ga" <matteo.galv...@mail.com>, pspp-users@gnu.org
Subject: Re: find duplicate in dataset
I would construct a new variable with values A1, A2, A2, B1, etc. but you could do something like this (from memory/untested):
sort cases by var 1 var2.
compute dup=0.
execute.
if( lag(var1)=var1 and lag(var2)=var2) dup = lag(dup)+1.
execute.
Sometimes lag() surprises me, but I think the above should work.
-Alan
sort cases by var 1 var2.
compute dup=0.
execute.
if( lag(var1)=var1 and lag(var2)=var2) dup = lag(dup)+1.
execute.
Sometimes lag() surprises me, but I think the above should work.
-Alan
On 2/25/2019 4:56 AM, Matteo Ga wrote:
Hi,I have a dataset with dupliucated cases that could be identified by 2 variable.EX:Case -- var1 --- var21 -- A --- 12 -- A --- 23 -- A --- 24 -- B --- 15 -- B --- 2I want to find (and then remove) any cases like 3I searched online but I couldn't find any way how to do that.Any help?Thank you_______________________________________________ Pspp-users mailing list Pspp-users@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-users
-- Alan D. Mead, Ph.D. President, Talent Algorithms Inc. science + technology = better workers http://www.alanmead.org "You're an interesting species. An interesting mix. You're capable of such beautiful dreams, and such horrible nightmares. You feel so lost, so cut off, so alone, only you're not. See, in all our searching, the only thing we've found that makes the emptiness bearable, is each other." -- Carl Sagan, Contact
_______________________________________________ Pspp-users mailing list Pspp-users@gnu.org https://lists.gnu.org/mailman/listinfo/pspp-users