<?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: perform calculation evaluation in associative array in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41553#M24260</link>
    <description>&lt;P&gt;Thank you, it works&lt;/P&gt;</description>
    <pubDate>Thu, 06 Jul 2017 15:58:55 GMT</pubDate>
    <dc:creator>swu2</dc:creator>
    <dc:date>2017-07-06T15:58:55Z</dc:date>
    <item>
      <title>perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41222#M24045</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get a function to return a standard deviation calculation stored inside an associative array, my code will only return the expression of the associative array and not the calculation.&amp;nbsp; would you please tell me what is wrong with my code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;cvf&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Max&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;replist&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;// my cvf in the file is 8&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;cv&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Associative Array&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;()&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;cv&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;6&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Associative Array&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;({(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Std Dev&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;FONT color="#008080" face="Consolas"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;10&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;))})&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;cv&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;8&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Associative Array&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;({(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Std Dev&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;FONT color="#008080" face="Consolas"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;11&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;12&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;))})&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;cv&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;12&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Associative Array&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;({(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Std Dev&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;FONT color="#008080" face="Consolas"&gt;5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;6&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;7&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;8&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;9&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;10&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;11&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;13&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;14&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;16&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;))})&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;CVC &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Function&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;ref&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Local&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;({&lt;/STRONG&gt;cv &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Associative Array&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;({&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;cvf&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Eval&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;cvf&lt;STRONG&gt;)}&lt;/STRONG&gt; &lt;STRONG&gt;)}&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;cv &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;get values&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;cvf&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;cv&lt;STRONG&gt;[&lt;/STRONG&gt;ref&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;a&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;CVC&lt;STRONG&gt;(&lt;/STRONG&gt;cvf&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;eval&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;eval expr&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;a&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Consolas"&gt;Show(a);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Consolas"&gt;this is the output that I get: &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;a = Associative Array({{Std Dev( 5, 6, 7, 8, 9, 10, 11, 12 ), 1}}, 0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Consolas"&gt;this is the output that I want: a= 2.5&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 22:00:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41222#M24045</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-06-26T22:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41226#M24049</link>
      <description>&lt;P&gt;I figure out my problem, but I have a new problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my associateive array is a formula, and I need to retrive the key to perform the calculation.&lt;/P&gt;&lt;P&gt;my code will return a, which is the formula on how to calculate standard deviation. but when I put the formula into a new formula, the new formula doesn't perform the calcualtion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;a&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;CVC&lt;STRONG&gt;(&lt;/STRONG&gt;cvf&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;get keys&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;cvf&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;show&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;a&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;// this is the formula with a: &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;{Std Dev(:INSTRUMENT_SIGNAL[Row() + 8], :INSTRUMENT_SIGNAL[Row() + 1], :INSTRUMENT_SIGNAL[Row() + 2], :INSTRUMENT_SIGNAL[Row() + 3], :INSTRUMENT_SIGNAL[Row() + 4], :INSTRUMENT_SIGNAL[Row() + 5], :INSTRUMENT_SIGNAL[Row() + 6], :INSTRUMENT_SIGNAL[Row() + 7])};&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;but once I put a into the new formula below: a would do the calculation. Please help!&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;c&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;ol&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;2&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;set formula&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;If&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;RUNSAMPLEKIND &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;==&lt;/FONT&gt; &lt;FONT color="#800080" face="Consolas"&gt;"TITERC.NEG"&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;a&lt;FONT color="#000080" face="Consolas"&gt;/&lt;/FONT&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;Average Signal&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;*&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;If&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;RUNSAMPLEKIND&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Row&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;()]&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;==&lt;/FONT&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;RUNSAMPLEKIND&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Row&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;()&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;+&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;1&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;If&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;REP&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Row&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;()]&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;!=&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Std Dev&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;INSTRUMENT_SIGNAL&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Row&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;()&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;+&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;1&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;INSTRUMENT_SIGNAL&lt;STRONG&gt;[&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Row&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;()]&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;/&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;Average Signal&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;*&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 22:42:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41226#M24049</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-06-26T22:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41244#M24066</link>
      <description>&lt;P&gt;Let's start over.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What are you trying to do?&lt;/LI&gt;
&lt;LI&gt;What is your data like?&lt;/LI&gt;
&lt;LI&gt;How is it organized?&lt;/LI&gt;
&lt;LI&gt;What are the results you need?&lt;/LI&gt;
&lt;LI&gt;What do you want to do with the results?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;It isn't clear to me that you need to use an associative array.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 12:08:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41244#M24066</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-06-27T12:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41270#M24080</link>
      <description>&lt;P&gt;there are three columns in a data table, and one will indicate replicate number, and the other will have a signal output for the replicate, and the last one&amp;nbsp;will have the dataID. and I&amp;nbsp;need to calculate the standard deviation for all dataID. all of the data will only have two replicate, except one specific type named "Titer" and depending on the where the data is generated, data type "Titer" can have 6, 8 or 12 replicate. hence, i make those three cases as an array and link them to the replicate column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code and return the formula to standard devaition calculation, however, when I put those in a new columns for CV calcualtion, it doesn't do anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the other option that I can think is using the Tabulate platform to get the standard devation and put them in an array and assign them back to the new column. Any suggestion?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 16:33:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41270#M24080</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-06-27T16:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41271#M24081</link>
      <description>&lt;P&gt;Try this example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

Summarize( age grp = By( :age ), avg = Mean( :height ), sd = Std Dev( :height ) );
age grp = Associative Array( :age ) &amp;lt;&amp;lt; Get Keys;

dt &amp;lt;&amp;lt; New Column( "CV" );

For( g = 1, g &amp;lt;= N Items( age grp ), g++,
	rows = dt &amp;lt;&amp;lt; Get Rows Where( :age == age grp[g] )
	:CV[rows] = 100 * sd[g] / avg[g];
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Jun 2017 16:51:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41271#M24081</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-06-27T16:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41362#M24140</link>
      <description>&lt;P&gt;Thank, it is want I am looking for. thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shu&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 20:26:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41362#M24140</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-06-29T20:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41365#M24142</link>
      <description>&lt;P&gt;Hi Mark ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use your example and I am able to get the row number correctly, but the average and standard deviation is not correct. And my table is over 10,000 line, the calculation is bit slow. Would you please tell me where do I did wrong? thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Names Default to Here&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;dt &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Open&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800080" face="Consolas"&gt;"$SAMPLE_DATA/Big Class.jmp"&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;Summarize&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt; age grp &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; By&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;age&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;sex grp&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; By &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;sex&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; avg &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Mean&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;height &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; sd &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Std Dev&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;height &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;age grp &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Associative Array&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;age &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;Get Keys&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;sex grp &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;Associative Array&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;sex &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;Get Keys&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;dt &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;&amp;lt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;New Column&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#800080" face="Consolas"&gt;"CV"&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;For&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt; g &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; g &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;=&lt;/FONT&gt; &lt;FONT color="#0000dd" face="Consolas"&gt;nitems&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;age grp&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; g&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;++,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;for&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; &lt;STRONG&gt;(&lt;/STRONG&gt;i &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; i&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;=&lt;/FONT&gt;&lt;FONT color="#0000dd" face="Consolas"&gt;nitems&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Consolas"&gt;sex grp&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;,&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; i&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;++,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;rows &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; dt &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;lt;&amp;lt;&lt;STRONG&gt;get rows where&lt;/STRONG&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Consolas"&gt;(&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;age &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;==&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; age grp&lt;STRONG&gt;[&lt;/STRONG&gt;g&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;&amp;amp;&lt;/FONT&gt; &lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;sex &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;==&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; sex grp&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;])&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Consolas"&gt;:&lt;/FONT&gt;&lt;FONT face="Consolas"&gt;CV&lt;STRONG&gt;[&lt;/STRONG&gt;rows&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;=&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Consolas"&gt;100&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#000080" face="Consolas"&gt;*&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; sd&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;/&lt;/FONT&gt;&lt;FONT face="Consolas"&gt; avg&lt;STRONG&gt;[&lt;/STRONG&gt;i&lt;STRONG&gt;]&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Consolas"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT color="#000080" face="Consolas"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jun 2017 22:50:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41365#M24142</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-06-29T22:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41368#M24144</link>
      <description>&lt;P&gt;You could try to see if this is more effcient (which I might expect):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
// Example table
dt = Open("$SAMPLE_DATA/Big Class.jmp");
// Edit to taste . . .
var = Column(dt, "height");
byVars = {Column(dt, "sex"), Column(dt, "age")};
// Use a summary table with formula column
dt2 = dt &amp;lt;&amp;lt; Summary(Group(byVars), Mean(var), Std Dev(var));
Column(dt2, 4) &amp;lt;&amp;lt; setName("Mean");
Column(dt2, 5) &amp;lt;&amp;lt; setName("StdDev");
dt2 &amp;lt;&amp;lt; New Column( "CV", Numeric, "Continuous", Format( "Percent", 12, 3 ), Formula(:StdDev/:Mean));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need the CV values in the original table, use 'Tables &amp;gt; Join'.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 09:47:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41368#M24144</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-06-30T09:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41374#M24147</link>
      <description>&lt;P&gt;I apologize for missing the fact that you have two grouping variables. This modified script will show you how it works.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

// Open example of a data table
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// Estimate group statistics and group identities
Summarize( age sex grp = By( :age, :sex ), avg = Mean( :height ), sd = Std Dev( :height ) );

// Make a new columns for group result
dt	&amp;lt;&amp;lt; New Column( "Avg" ) &amp;lt;&amp;lt; New Column( "SD" ) &amp;lt;&amp;lt; New Column( "CV" );

// Iterate over groups
For( g = 1, g &amp;lt;= N Items( age grp ), g++,
	// Convert :age level to match data type of identity
	rows = dt &amp;lt;&amp;lt; Get Rows Where( Char( :age ) == age sex grp[1][g] &amp;amp; :sex == age sex grp[2][g] );
	:Avg[rows] = avg[g];
	:SD[rows] =sd[g];
	:CV[rows] = 100 * sd[g] / avg[g];
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I don't think that an associative array is the most efficient way to identify the groups. The Summarize() function simultaneously estimates&amp;nbsp;the group statistics and identifies the associated group using&amp;nbsp;two parallel lists of group levels. The only downside, in my opinion, is that the grouping levels are always character strings even if the original levels are numeric, such as :age levels in this case. So I had to convert the :age level for the comparison used in getting the target row numbers.&lt;/P&gt;
&lt;P&gt;Now you have two approaches, including Ian's solution using Summary command\.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2017 11:32:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41374#M24147</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-06-30T11:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41421#M24175</link>
      <description>&lt;P&gt;Not sure when it appeared, but FYI, I just noticed that in my version of JMP (13), "CV' is one of the statistics provided by 'Tables &amp;gt; Summary'. So the formula column is not needed.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2017 09:38:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41421#M24175</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2017-07-03T09:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41553#M24260</link>
      <description>&lt;P&gt;Thank you, it works&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2017 15:58:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/41553#M24260</guid>
      <dc:creator>swu2</dc:creator>
      <dc:date>2017-07-06T15:58:55Z</dc:date>
    </item>
    <item>
      <title>Re: perform calculation evaluation in associative array</title>
      <link>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/523110#M74789</link>
      <description>&lt;P&gt;Summarize(age grp) is list of two lists and is not compatible with Associative array(age grp). Also avg and sd are in a single list which is not compatible for cross referencing with Summary(age grp). The code below aligns the lists correctly (not pretty)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

Summarize( sum = By( :age),sex grp= By (:sex), avg = Mean( :height ), sd = Std Dev( :height ) );
age grp = Associative Array( :age ) &amp;lt;&amp;lt; Get Keys;
sex grp = Associative Array( :sex ) &amp;lt;&amp;lt; Get Keys;

dt &amp;lt;&amp;lt; New Column( "CV" ) &amp;lt;&amp;lt; New Column( "AVG" ) &amp;lt;&amp;lt; New Column( "SD" );

For( g = 1, g &amp;lt;= nitems(age grp), g++,
	For(i =1, i&amp;lt;=nitems(sex grp), i++,
rows = dt &amp;lt;&amp;lt; get rows where( :age == age grp[g] &amp;amp; :sex == sex grp[i] );
if( i==1,
	:AVG[rows] = avg[ g*2-1 ];
	:SD[rows] = sd[ g*2-1 ];
	:CV[rows] = 100 * avg[ g*2-1 ] / sd[ g*2-1 ];
	,
	:AVG[rows] = avg[ g*i ];
	:SD[rows] = sd[ g*i ];
	:CV[rows] = 100 * avg[ g*i ] / sd[ g*i ];
)));

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 18 Jul 2022 22:04:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/perform-calculation-evaluation-in-associative-array/m-p/523110#M74789</guid>
      <dc:creator>matchungtesla</dc:creator>
      <dc:date>2022-07-18T22:04:27Z</dc:date>
    </item>
  </channel>
</rss>

