<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic find duplicates and drop by state in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661494#M85021</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a data table that contains duplicates.&lt;/P&gt;&lt;P&gt;I want to find the duplicates.&lt;/P&gt;&lt;P&gt;duplicates are rows with the same, Col, Row, Scan number, and ID values.&lt;/P&gt;&lt;P&gt;then, for duplicates with the same&amp;nbsp;col, row, scan number, and ID values I want to keep only those with max abs offsetX (i only have the OffsetX values, need to run Abs formula )&lt;/P&gt;&lt;P&gt;each Col, Row, and Scan number should have 4 rows with ID 0-3.&lt;/P&gt;&lt;P&gt;my final table will include all unique results+ results after removing duplicates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jul 2023 18:05:17 GMT</pubDate>
    <dc:creator>Ohad_s</dc:creator>
    <dc:date>2023-07-23T18:05:17Z</dc:date>
    <item>
      <title>find duplicates and drop by state</title>
      <link>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661494#M85021</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a data table that contains duplicates.&lt;/P&gt;&lt;P&gt;I want to find the duplicates.&lt;/P&gt;&lt;P&gt;duplicates are rows with the same, Col, Row, Scan number, and ID values.&lt;/P&gt;&lt;P&gt;then, for duplicates with the same&amp;nbsp;col, row, scan number, and ID values I want to keep only those with max abs offsetX (i only have the OffsetX values, need to run Abs formula )&lt;/P&gt;&lt;P&gt;each Col, Row, and Scan number should have 4 rows with ID 0-3.&lt;/P&gt;&lt;P&gt;my final table will include all unique results+ results after removing duplicates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2023 18:05:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661494#M85021</guid>
      <dc:creator>Ohad_s</dc:creator>
      <dc:date>2023-07-23T18:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: find duplicates and drop by state</title>
      <link>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661513#M85024</link>
      <description>&lt;P&gt;I'm not 100% sure if this will work or not as I didn't test it&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create new column for Abs(OffsetX). You should be able to do this by selecting the column and right clicking&lt;/LI&gt;
&lt;LI&gt;Sort descending by the new column&lt;/LI&gt;
&lt;LI&gt;Select Col, Row, Scan and ID columns&lt;/LI&gt;
&lt;LI&gt;Go to Rows / Row Selection and Select Duplicate Rows&lt;/LI&gt;
&lt;LI&gt;You should have now the rows selected which you wish to delete&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Sun, 23 Jul 2023 18:43:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661513#M85024</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-07-23T18:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: find duplicates and drop by state</title>
      <link>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661517#M85025</link>
      <description>&lt;P&gt;Here is a script that uses the Summary Platform to find the unique combinations of Col, Row, ID and Scan Number.&amp;nbsp; It also uses a little trick to find the Maximum deviation from zero value for the OffssetX column.&amp;nbsp; However, it is not finding a consistent number of rows for the unique combinations.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1690138874973.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/55200i4BF95735941A9F0C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1690138874973.png" alt="txnelson_0-1690138874973.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Data Table( "raw data-start" );
Data Table( "raw data-start" ) &amp;lt;&amp;lt; Summary(
	Group( :Col, :Row, :ID, :Scan Number ),
	Min( :OffsetX ),
	Max( Transform Column( "Abs OffsetX", Formula( Abs( :OffsetX ) ) ) ),
	Freq( "None" ),
	Weight( "None" ),
	Link to Original Data Table( 0 ),
	statistics column name format( "column" )
);

For Each Row(
	If( :OffsetX &amp;gt; 0 &amp;amp; Abs( :OffsetX ) &amp;lt; :Abs OffsetX,
		:OffsetX = :Abs OffsetX
	)
);

// dt &amp;lt;&amp;lt; delete columns( :Abs OffsetX );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Jul 2023 19:01:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661517#M85025</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-07-23T19:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: find duplicates and drop by state</title>
      <link>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661604#M85034</link>
      <description>&lt;P&gt;Thank you, this works fine!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2023 07:39:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/find-duplicates-and-drop-by-state/m-p/661604#M85034</guid>
      <dc:creator>Ohad_s</dc:creator>
      <dc:date>2023-07-24T07:39:10Z</dc:date>
    </item>
  </channel>
</rss>

