<?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 RE: Selecting Matching Character Values in the Same Column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/RE-Selecting-Matching-Character-Values-in-the-Same-Column/m-p/62957#M33851</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm aware I could make use of loops to solve this problem but I was wondering if there was a function / another way to find matching character values in one row in my data table in JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 23:25:19 GMT</pubDate>
    <dc:creator>Jaz</dc:creator>
    <dc:date>2023-06-09T23:25:19Z</dc:date>
    <item>
      <title>RE: Selecting Matching Character Values in the Same Column</title>
      <link>https://community.jmp.com/t5/Discussions/RE-Selecting-Matching-Character-Values-in-the-Same-Column/m-p/62957#M33851</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm aware I could make use of loops to solve this problem but I was wondering if there was a function / another way to find matching character values in one row in my data table in JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:25:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/RE-Selecting-Matching-Character-Values-in-the-Same-Column/m-p/62957#M33851</guid>
      <dc:creator>Jaz</dc:creator>
      <dc:date>2023-06-09T23:25:19Z</dc:date>
    </item>
    <item>
      <title>RE: Selecting Matching Character Values in the Same Column</title>
      <link>https://community.jmp.com/t5/Discussions/RE-Selecting-Matching-Character-Values-in-the-Same-Column/m-p/62958#M33852</link>
      <description>&lt;P&gt;Create a column called RowNum and give it the formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Row();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then run the Stack Platform&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tables==&amp;gt;Stack&lt;/P&gt;
&lt;P&gt;stacking all of the character columns you want to find matches for.&amp;nbsp; Also select the column RowNum to be included in the new data table.&lt;/P&gt;
&lt;P&gt;Now run the Summary Platform&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tables==&amp;gt;Summary&lt;/P&gt;
&lt;P&gt;Select the column called Data as the Statistics column choosing&amp;nbsp; "N" as the statistic, and then select the column RowNum as the Group column.&lt;/P&gt;
&lt;P&gt;This will give you a new data table, where the column N Rows, will indicate the number of matches for each value for each row.&amp;nbsp; Just select one of the cells where only 1 match was found, and right click.&amp;nbsp; Select, "Select Matching Cells".&amp;nbsp; Once all of the matching rows are selected, go to the RowState column, and right click on one of the selected rows.&amp;nbsp; Select "Delete Rows".&amp;nbsp; What is left are all of the rows with matches for values in those rows.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2018 17:25:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/RE-Selecting-Matching-Character-Values-in-the-Same-Column/m-p/62958#M33852</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-07-15T17:25:35Z</dc:date>
    </item>
    <item>
      <title>RE: Selecting Matching Character Values in the Same Column</title>
      <link>https://community.jmp.com/t5/Discussions/RE-Selecting-Matching-Character-Values-in-the-Same-Column/m-p/62975#M33853</link>
      <description>&lt;P&gt;Jim provided an excellent suggestion. Here is another alternative, that uses Combine Columns.&amp;nbsp; From the UI,&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;select the columns to be searched, for my example table below, :C1 thru :C10&lt;/LI&gt;&lt;LI&gt;select from the Main Menu &amp;gt; Cols &amp;gt; Utilities &amp;gt; Combine Columns, I used the carat (^) as the delimiter and called the new column "Search"&lt;/LI&gt;&lt;LI&gt;create a new column, and create a function; here I am searching for "y".&amp;nbsp; If you want a count use&amp;nbsp; the formula. Note Words(:Search,"^") creates a list of column values, Loc returns what positions match the search string ("y") and N Row is the Count&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;N Row( Loc( Words( :Search, "^" ), "y" ) )&lt;/PRE&gt;&lt;UL&gt;&lt;LI&gt;&amp;nbsp;if you want to know which columns (here I am searching for "y"), use the formula below. It returns a vector of which columns contain the search string., e.g, [1,5,7] or [] if no matches.&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;Loc( Words( :Search, "^" ), "y" )&lt;/PRE&gt;&lt;P&gt;Attached is a script that creates a sample table, creates the combined columns, and create the two formula columns for Count and loc&lt;/P&gt;</description>
      <pubDate>Sun, 15 Jul 2018 20:54:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/RE-Selecting-Matching-Character-Values-in-the-Same-Column/m-p/62975#M33853</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-07-15T20:54:57Z</dc:date>
    </item>
  </channel>
</rss>

