<?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: Delete specific columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Delete-specific-columns/m-p/20825#M18935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works great. Thanks Ian!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Oct 2016 16:15:38 GMT</pubDate>
    <dc:creator>danielharding0</dc:creator>
    <dc:date>2016-10-05T16:15:38Z</dc:date>
    <item>
      <title>Delete specific columns</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-specific-columns/m-p/20823#M18933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to delete columns based on specific data in those columns. For example, if the column contains the value RA, TV, EW, or EH&amp;nbsp; I want to delete it. I've worked with the code below and no errors appear in the log, but no columns are deleted either. Thanks for any help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dt = current data table();&lt;/P&gt;&lt;P&gt;for(i = 1, i&amp;lt;=NCol(dt), i++,&lt;/P&gt;&lt;P&gt;if (Column(i)== "RA" , dt&amp;lt;&amp;lt; delete columns(column(i)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Column(i) == "TV", dt &amp;lt;&amp;lt; delete columns(column(i)),&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(Column(i) == "EW", dt&amp;lt;&amp;lt; delete columns(column(i)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Column(i) == "EH", dt &amp;lt;&amp;lt; delete columns(column(i))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )))));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also tried this &lt;/P&gt;&lt;P&gt;dt = current data table();&lt;/P&gt;&lt;P&gt;for(i = 1, i&amp;lt;=NCol(dt), i++,&lt;/P&gt;&lt;P&gt;for each row(if (Column(i)== "RA" , dt&amp;lt;&amp;lt; delete columns(column(i)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Column(i) == "TV", dt &amp;lt;&amp;lt; delete columns(column(i)),&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(Column(i) == "EW", dt&amp;lt;&amp;lt; delete columns(column(i)),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Column(i) == "High Dose", dt &amp;lt;&amp;lt; delete columns(column(i))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; )))));&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 13:40:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-specific-columns/m-p/20823#M18933</guid>
      <dc:creator>danielharding0</dc:creator>
      <dc:date>2016-10-05T13:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Delete specific columns</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-specific-columns/m-p/20824#M18934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's one way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;NamesDefaultToHere&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; min-height: 17px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #942193;"&gt;&lt;SPAN style="color: #000000;"&gt;dt = &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;Open&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;"$SAMPLE_DATA/Big Class.jmp"&lt;SPAN style="color: #000000;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; min-height: 17px;"&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #008f00;"&gt;// Delete columns based on contents . . .&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; color: #032ce4;"&gt;Wait&lt;SPAN style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #009193;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN style="color: #032ce4;"&gt;for&lt;/SPAN&gt;(c = &lt;SPAN style="color: #032ce4;"&gt;NCols&lt;/SPAN&gt;(dt), c&amp;gt;=&lt;SPAN style="color: #009193;"&gt;1&lt;/SPAN&gt;, c--,&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;colVals = &lt;SPAN style="color: #032ce4;"&gt;Column&lt;/SPAN&gt;(c) &amp;lt;&amp;lt; &lt;SPAN style="color: #011993;"&gt;getValues&lt;/SPAN&gt;;&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;&lt;SPAN class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #032ce4;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #032ce4;"&gt;Contains&lt;/SPAN&gt;(colVals, &lt;SPAN style="color: #942193;"&gt;"KATIE"&lt;/SPAN&gt;), dt &amp;lt;&amp;lt; &lt;SPAN style="color: #011993;"&gt;deleteColumn&lt;/SPAN&gt;(c));&lt;/P&gt;&lt;P style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier;"&gt;);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 14:05:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-specific-columns/m-p/20824#M18934</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2016-10-05T14:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Delete specific columns</title>
      <link>https://community.jmp.com/t5/Discussions/Delete-specific-columns/m-p/20825#M18935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Works great. Thanks Ian!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 16:15:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Delete-specific-columns/m-p/20825#M18935</guid>
      <dc:creator>danielharding0</dc:creator>
      <dc:date>2016-10-05T16:15:38Z</dc:date>
    </item>
  </channel>
</rss>

