<?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: JLS- Divide Column by a Value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16165#M14745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I chose to use David's second method.&amp;nbsp; I think I understand why his first method has an issue, but I was unable to make your suggested changes.&amp;nbsp; As I run the script, I can make all the new column, but the formulas are not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; col= new column("."); //add blank column&lt;/P&gt;&lt;P&gt;&amp;nbsp; col=New Column("Id(A/mm)",numeric,continuous);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; col&amp;lt;&amp;lt;Set Formula(Eval,Parse(":Id(A)/"||Char(Wg)));&lt;/P&gt;&lt;P&gt;&amp;nbsp; col&amp;lt;&amp;lt;delete property(":Id(A)/"||Char(Wg));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jan 2016 16:17:16 GMT</pubDate>
    <dc:creator>natalie_</dc:creator>
    <dc:date>2016-01-08T16:17:16Z</dc:date>
    <item>
      <title>JLS- Divide Column by a Value</title>
      <link>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16161#M14741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am writing some script which opens several csv files and joins them; it is working well!&lt;/P&gt;&lt;P&gt;In one column, I'd like to divide the values of another column by a value.&amp;nbsp; I just can't figure it out.&amp;nbsp; I can do it on the formula editor though, but I don't believe I can use that syntax while scripting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt &amp;lt;&amp;lt; New Column(".");&amp;nbsp; //just to create a blank column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dt &amp;lt;&amp;lt; New Column("Id(A/mm)");&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; col = Column("Id(A/mm)");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; col &amp;lt;&amp;lt; Set Formula(Column("Id(A)")/Wg);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; col &amp;lt;&amp;lt; EvalFormula;&lt;/P&gt;&lt;P&gt;[code/]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 21:41:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16161#M14741</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-07T21:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: JLS- Divide Column by a Value</title>
      <link>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16162#M14742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;something like this maybe:&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: Consolas; color: black;"&gt;someNumbers &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;::&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;10&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; 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: Consolas; color: #0000dd;"&gt;New Table&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"demo"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; 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: Consolas; color: black;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Add Rows&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: teal;"&gt;10&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Sequence"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; numeric&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; continuous&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;Set Values&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;someNumbers&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; 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: Consolas; color: black;"&gt;col &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"."&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; numeric&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; continuous&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; 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: Consolas; color: black;"&gt;valueToDivideBy &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10.0pt; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; 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: Consolas; color: black;"&gt;col &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;Set Formula&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;Sequence&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;/&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;valueToDivideBy&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; 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: Consolas; color: green;"&gt;// or ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;col &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;New Column&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;".."&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; numeric&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt; continuous&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;col &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;Set Formula&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;(&lt;/SPAN&gt;&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: #0000dd;"&gt;AsColumn&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;(&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: purple;"&gt;"Sequence"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 10.0pt; font-family: Consolas;"&gt;)&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;/&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: teal;"&gt;2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: black;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: Consolas; color: navy;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jan 2016 22:46:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16162#M14742</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2016-01-07T22:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: JLS- Divide Column by a Value</title>
      <link>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16163#M14743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an issue with the first solution provided by David.&amp;nbsp; While the code will work, the formula created is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :Sequence/valueToDivideBy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since "valueToDivideBy" is a scalar memory variable, that will go away once the JMP session is closed, or could change value during the course of the day's processing, the calculated value of "col" could become invalid or incorrect.&amp;nbsp; The second version of the formula would be preferred.&amp;nbsp; However, if you want to use the structure of the first solution, you could do a couple of things:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Change the Se Formula to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col &amp;lt;&amp;lt; Set Formula(Eval(Parse(":Sequence/"||char(valueToDivideBy)));&lt;/P&gt;&lt;P&gt;2. Convert the formula to static values once the formula has been applied.&amp;nbsp; To do this, add the following line after the the col &amp;lt;&amp;lt; Set Formula line&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; col &amp;lt;&amp;lt; delete property("formula");&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 01:44:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16163#M14743</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2016-01-08T01:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: JLS- Divide Column by a Value</title>
      <link>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16164#M14744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, well spotted.&amp;nbsp; thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 08:20:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16164#M14744</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2016-01-08T08:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: JLS- Divide Column by a Value</title>
      <link>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16165#M14745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I chose to use David's second method.&amp;nbsp; I think I understand why his first method has an issue, but I was unable to make your suggested changes.&amp;nbsp; As I run the script, I can make all the new column, but the formulas are not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; col= new column("."); //add blank column&lt;/P&gt;&lt;P&gt;&amp;nbsp; col=New Column("Id(A/mm)",numeric,continuous);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; col&amp;lt;&amp;lt;Set Formula(Eval,Parse(":Id(A)/"||Char(Wg)));&lt;/P&gt;&lt;P&gt;&amp;nbsp; col&amp;lt;&amp;lt;delete property(":Id(A)/"||Char(Wg));&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jan 2016 16:17:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JLS-Divide-Column-by-a-Value/m-p/16165#M14745</guid>
      <dc:creator>natalie_</dc:creator>
      <dc:date>2016-01-08T16:17:16Z</dc:date>
    </item>
  </channel>
</rss>

