<?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 How can I find the row and column of a value within a data table? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-I-find-the-row-and-column-of-a-value-within-a-data-table/m-p/18622#M16974</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to find the column and row number of a particular value within a data table.&amp;nbsp;&amp;nbsp; I know how to search for a value within a particular column (ie., row = dt1 &amp;lt;&amp;lt; get rows where(:Device == "Device");) , which returns the row number, but what if I don't know what row it will be in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do this in JMP?&amp;nbsp; I see how to do it from going to edit then search, but is there a way to do this in JSL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 May 2016 15:31:54 GMT</pubDate>
    <dc:creator>natalie_</dc:creator>
    <dc:date>2016-05-19T15:31:54Z</dc:date>
    <item>
      <title>How can I find the row and column of a value within a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-find-the-row-and-column-of-a-value-within-a-data-table/m-p/18622#M16974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I need to find the column and row number of a particular value within a data table.&amp;nbsp;&amp;nbsp; I know how to search for a value within a particular column (ie., row = dt1 &amp;lt;&amp;lt; get rows where(:Device == "Device");) , which returns the row number, but what if I don't know what row it will be in?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do this in JMP?&amp;nbsp; I see how to do it from going to edit then search, but is there a way to do this in JSL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 15:31:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-find-the-row-and-column-of-a-value-within-a-data-table/m-p/18622#M16974</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-05-19T15:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find the row and column of a value within a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-find-the-row-and-column-of-a-value-within-a-data-table/m-p/18623#M16975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you're looking for text, then this example may be helpful:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;open&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"$sample_data\Bands Data.jmp"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;char_cols &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;get column names&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;Character&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; string&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;search_string &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"E310"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;i &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; i &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;lt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;nitems&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;char_cols&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; i&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;++,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; match_rows &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; dt &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;get rows where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;as column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;dt&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; char_cols&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;])&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; search_string&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i&lt;/SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;nrows&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;match_rows&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;&amp;gt;&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;print&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"Column: ["&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;||&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt; char_cols&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple;"&gt;"] Rows: "&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: #0000dd;"&gt;char&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;match_rows&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black;"&gt;&lt;STRONG&gt;&lt;SPAN style="color: #000000; font-family: 'Courier New'; font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 16:51:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-find-the-row-and-column-of-a-value-within-a-data-table/m-p/18623#M16975</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2016-05-19T16:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I find the row and column of a value within a data table?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-I-find-the-row-and-column-of-a-value-within-a-data-table/m-p/18624#M16976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, your examples are always great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know that the value can only happen once in the file, so I made a while loop instead so that it would not continue to check the other columns for it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;file = Pick File();&lt;/P&gt;&lt;P&gt;dt = Open (file);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for(i=1, i&amp;lt;=ncols(dt), i++, &lt;/P&gt;&lt;P&gt;&amp;nbsp; column(dt,i) &amp;lt;&amp;lt; data type(Character);&lt;/P&gt;&lt;P&gt;&amp;nbsp; column(dt,i) &amp;lt;&amp;lt; set modeling type(continuous);&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nCols = dt &amp;lt;&amp;lt; Get Column Names ("Character");&lt;/P&gt;&lt;P&gt;found =0;&lt;/P&gt;&lt;P&gt;search_string = "Vtlin";&lt;/P&gt;&lt;P&gt;i=1;&lt;/P&gt;&lt;P&gt;While (found == 0, &lt;/P&gt;&lt;P&gt;&amp;nbsp; match_rows = dt &amp;lt;&amp;lt; get rows where(as column(dt, nCols&lt;I&gt;)==search_string);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(nrows(match_rows) &amp;gt; 0, found = 1, i++);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(i==nCols, found =1, );&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;vtlinCol = i;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2016 19:04:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-I-find-the-row-and-column-of-a-value-within-a-data-table/m-p/18624#M16976</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-05-19T19:04:31Z</dc:date>
    </item>
  </channel>
</rss>

