<?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 Column Character Matching Formulae in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Column-Character-Matching-Formulae/m-p/785508#M96894</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with 2 Columns, I just wanted to check to see if the data in Column 1 is matching with Column 2, It doesn't have to match row by row. All what i am interested in checking is to see if we have the same observations, The order in which they are in both the columns if not a concern.&lt;/P&gt;&lt;P&gt;Can anybody help me with a formulae to be used to check this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank&lt;/P&gt;&lt;P&gt;Shawn&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2024 10:47:21 GMT</pubDate>
    <dc:creator>RMSEBudgie341</dc:creator>
    <dc:date>2024-08-27T10:47:21Z</dc:date>
    <item>
      <title>Column Character Matching Formulae</title>
      <link>https://community.jmp.com/t5/Discussions/Column-Character-Matching-Formulae/m-p/785508#M96894</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset with 2 Columns, I just wanted to check to see if the data in Column 1 is matching with Column 2, It doesn't have to match row by row. All what i am interested in checking is to see if we have the same observations, The order in which they are in both the columns if not a concern.&lt;/P&gt;&lt;P&gt;Can anybody help me with a formulae to be used to check this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank&lt;/P&gt;&lt;P&gt;Shawn&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 10:47:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-Character-Matching-Formulae/m-p/785508#M96894</guid>
      <dc:creator>RMSEBudgie341</dc:creator>
      <dc:date>2024-08-27T10:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Column Character Matching Formulae</title>
      <link>https://community.jmp.com/t5/Discussions/Column-Character-Matching-Formulae/m-p/785555#M96895</link>
      <description>&lt;P&gt;Here is an example of one way to do this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = New Table( "Example",
	add rows( 100 ),
	New Column( "c1", set each value( Random Integer( 1, 1000 ) ) ),
	New Column( "c2", set each value( Random Integer( 1, 1000 ) ) )
);

dt &amp;lt;&amp;lt; New Column( "Is in Both",
	formula(
		As Constant( c1Matrix = :c1 &amp;lt;&amp;lt; get values );
		If( Length( Loc( c1Matrix, :c2 ) ) &amp;gt; 0,
			1,
			0
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2024 11:10:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-Character-Matching-Formulae/m-p/785555#M96895</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-27T11:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Column Character Matching Formulae</title>
      <link>https://community.jmp.com/t5/Discussions/Column-Character-Matching-Formulae/m-p/785558#M96896</link>
      <description>&lt;P&gt;You can also use associative array to compare the results IF you don't have decimals in your Column 1 and Column 2&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(3),
	Compress File When Saved(1),
	New Column("Column 1", Character, "Nominal", Set Values({"A", "B", "C"})),
	New Column("Column 2", Character, "Nominal", Set Values({"AA", "B", "C"}))
);


dt &amp;lt;&amp;lt; New Column("Diff", Numeric, Nominal, Formula(
	As Constant(
		aa1 = Associative Array(:Column 1);
		aa2 = Associative Array(:Column 2);
		aa1 &amp;lt;&amp;lt; Remove(aa2);
		N Items(aa1) &amp;gt; 0;
	);
));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2024 11:43:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Column-Character-Matching-Formulae/m-p/785558#M96896</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-27T11:43:26Z</dc:date>
    </item>
  </channel>
</rss>

