<?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: Finding the Location of a Column Name Amongst a List of All the Column Names in a Data File in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Finding-the-Location-of-a-Column-Name-Amongst-a-List-of-All-the/m-p/395592#M64636</link>
    <description>&lt;P&gt;You might have to add String to &amp;lt;&amp;lt; get column names also try using Contains() instead of Loc().&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
colNames = dt &amp;lt;&amp;lt; Get Column Names(String);
Close(dt, no save);
Contains(colNames, "height");&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 23 Jun 2021 18:59:10 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2021-06-23T18:59:10Z</dc:date>
    <item>
      <title>Finding the Location of a Column Name Amongst a List of All the Column Names in a Data File</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-the-Location-of-a-Column-Name-Amongst-a-List-of-All-the/m-p/395586#M64634</link>
      <description>&lt;P&gt;As the post subject implies, I'm trying to find the loc # of a col identified by name in a given data file. I have the column name. Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;column_names = datatable &amp;lt;&amp;lt; Get Column Names();&lt;BR /&gt;Write(column_names);
column_position = loc(column_names, "ARBITRARY COLUMN TITLE/NAME");
Write(column_position);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Write(column_names) works but Write(column_position) outputs an empty matrix []. I don't know why this doesn't work. Any thoughts? I copy pasted the title of the column name, replaced for confidentiality but here denoted by "ARBITRARY COLUMN TITLE/NAME", so it should match exactly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:50:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-the-Location-of-a-Column-Name-Amongst-a-List-of-All-the/m-p/395586#M64634</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2023-06-09T19:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the Location of a Column Name Amongst a List of All the Column Names in a Data File</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-the-Location-of-a-Column-Name-Amongst-a-List-of-All-the/m-p/395587#M64635</link>
      <description>I did look up the info at &amp;lt;&lt;A href="https://www.jmp.com/support/help/en/16.0/index.shtml#page/jmp/get-column-names.shtml" target="_blank"&gt;https://www.jmp.com/support/help/en/16.0/index.shtml#page/jmp/get-column-names.shtml&lt;/A&gt;&amp;gt; but it didn't help with the bug.</description>
      <pubDate>Wed, 23 Jun 2021 18:54:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-the-Location-of-a-Column-Name-Amongst-a-List-of-All-the/m-p/395587#M64635</guid>
      <dc:creator>mostarr</dc:creator>
      <dc:date>2021-06-23T18:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the Location of a Column Name Amongst a List of All the Column Names in a Data File</title>
      <link>https://community.jmp.com/t5/Discussions/Finding-the-Location-of-a-Column-Name-Amongst-a-List-of-All-the/m-p/395592#M64636</link>
      <description>&lt;P&gt;You might have to add String to &amp;lt;&amp;lt; get column names also try using Contains() instead of Loc().&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
colNames = dt &amp;lt;&amp;lt; Get Column Names(String);
Close(dt, no save);
Contains(colNames, "height");&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Jun 2021 18:59:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Finding-the-Location-of-a-Column-Name-Amongst-a-List-of-All-the/m-p/395592#M64636</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-06-23T18:59:10Z</dc:date>
    </item>
  </channel>
</rss>

