<?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: Add Rows Function Question in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/49470#M28129</link>
    <description>&lt;P&gt;create a new column and give it the formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col cumulative sum( :Cost )&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 10 Jan 2018 03:16:42 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2018-01-10T03:16:42Z</dc:date>
    <item>
      <title>Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48867#M27766</link>
      <description>&lt;P&gt;All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am using JMP 13.1.0 on a Windows 7 machine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I am trying to add rows to a data table after a specific row.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;According to the documentation (&lt;A href="http://www.jmp.com/support/help/13-2/Add_Rows_2.shtml)&amp;nbsp;" target="_blank"&gt;http://www.jmp.com/support/help/13-2/Add_Rows_2.shtml)&amp;nbsp;&lt;/A&gt; that I am referencing, the correct way to do that is :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Add Rows( 3, 10 ); /* add 3 rows after the 10th row, moving the 11th and lower rows farther down */&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Now , I expand on that to do this :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" ); // Open Sample Data 

RowStyle1 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = 102}; // Define Row To Add 

RowIndex = 1 ; // Define position to add desired row 

dt1 &amp;lt;&amp;lt; Add Rows(RowStyle1,RowIndex); // Add Rows . &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The result of this piece of code is shown in the screeshot below :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 397px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/8758i07EEA692FAC806C4/image-dimensions/397x167?v=v2" width="397" height="167" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Shouldn't the row be added after row 1 - essentially moving rows 2 through 40 down ?&amp;nbsp;&lt;BR /&gt;Can someone point out what i am doing wrong here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also - would like to add one more question on Add Rows() :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RowStyle2 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = :weight[1]/2}; // Define Row To Add &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If instead of a pre-defined value, I wanted to use a dynamic value like shown above RowStyle2 vs RowStyle1 - should I be using expressions? If yes - please provide an example.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 19:27:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48867#M27766</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-12-19T19:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48869#M27767</link>
      <description>&lt;P&gt;I do not know if it is the best way, but it works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Open( "$SAMPLE_DATA/Big Class.jmp" ); // Open Sample Data
RowStyle1 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = 102}; // Define Row To Add
RowIndex = 10 ; // Define position to add desired row 　
dt1 &amp;lt;&amp;lt; add Rows(RowStyle1 );
dt1 &amp;lt;&amp;lt; Select Rows(n rows(dt1));
dt1 &amp;lt;&amp;lt; Move Rows(After(RowIndex)); // Add Rows .&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Consolas" size="2" color="#008000"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 21:57:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48869#M27767</guid>
      <dc:creator>vladbondarenko0</dc:creator>
      <dc:date>2017-12-19T21:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48870#M27768</link>
      <description>Appreciate the idea @vladbindarenko0 but I want to understand why the documented method is not working</description>
      <pubDate>Tue, 19 Dec 2017 20:10:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48870#M27768</guid>
      <dc:creator>uday_guntupalli</dc:creator>
      <dc:date>2017-12-19T20:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48871#M27769</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6696"&gt;@uday_guntupalli&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The documented code works correctly.&amp;nbsp; I think what you are missing, is that the Add Rows() function has 2 different code structures, and that mixing the 2 structures does not work.&lt;/P&gt;
&lt;P&gt;Add Rows(1) or Add Rows(1,3) is one of the syntax structures&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;Add Rows({list}) or Add Rows({List of Lists}) is the second structure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My testing of the code does not permit the mixing of the 2 syntax structures&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 20:25:05 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48871#M27769</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-12-19T20:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48873#M27770</link>
      <description>&lt;P&gt;In addition to what&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/281"&gt;@vladbondarenko0&lt;/a&gt;&amp;nbsp;already provided, you can use JMP 13 data table subscripting to set all the row values at once after you already added the row where you want.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Add Rows(1,1);
dt[[2],{name,age,sex,height,weight}] = {{"Mark", 14, "M", 61, 124}};&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Looking at the documentation,&amp;nbsp;specifying a row position in the Add Rows message is not supported when using the list of values approach. The row index position is only used when inserting&amp;nbsp;&lt;EM&gt;n&lt;/EM&gt; empty rows. Feel free to shoot us an email at &lt;A href="http://mailto:support@jmp.com" target="_self"&gt;support@jmp.com&lt;/A&gt; and we can add this as a feature request for consideration in a future release of JMP.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 20:29:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48873#M27770</guid>
      <dc:creator>Justin_Chilton</dc:creator>
      <dc:date>2017-12-19T20:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48875#M27772</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/1855"&gt;@Justin_Chilton&lt;/a&gt;&amp;nbsp; Nice Tip!&amp;nbsp; I'm going to keep that one in my tool box.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;-B&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 20:38:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48875#M27772</guid>
      <dc:creator>Byron_JMP</dc:creator>
      <dc:date>2017-12-19T20:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48876#M27773</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4386"&gt;@Byron_JMP&lt;/a&gt;, you might want to check out&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/982"&gt;@Craige_Hales&lt;/a&gt;' blog &lt;A href="https://community.jmp.com/t5/Uncharted/Data-table-subscripting/ba-p/21013" target="_self"&gt;Data table subscripting&lt;/A&gt;&amp;nbsp;for more cool examples like that.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2017 20:40:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/48876#M27773</guid>
      <dc:creator>Justin_Chilton</dc:creator>
      <dc:date>2017-12-19T20:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/49465#M28128</link>
      <description>&lt;P&gt;Hi All.&lt;/P&gt;&lt;P&gt;i have a table like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Module&amp;nbsp; &amp;nbsp; MONTH&amp;nbsp; &amp;nbsp; &amp;nbsp;COST&lt;/P&gt;&lt;P&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;30&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 44&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 33&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;22&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;as you can see, month colluum is missing some months in a row. and i also want to cumulative sum the cost coluum base on module into a new coluum, the new table will be like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Module&amp;nbsp; &amp;nbsp; Month&amp;nbsp; &amp;nbsp; cost&amp;nbsp; &amp;nbsp; &amp;nbsp; totalcost&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;15&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;35&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;25&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;60&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;STHI&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;90&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 44&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 44&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 54&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 98&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;98&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;4&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;33&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 131&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;OLB&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 22&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;153&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is there any way to transfer to the table like this, could you please to help me. Thank you so much&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2018 02:21:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/49465#M28128</guid>
      <dc:creator>HauNguyen</dc:creator>
      <dc:date>2018-01-10T02:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Add Rows Function Question</title>
      <link>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/49470#M28129</link>
      <description>&lt;P&gt;create a new column and give it the formula&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;col cumulative sum( :Cost )&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jan 2018 03:16:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-Rows-Function-Question/m-p/49470#M28129</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2018-01-10T03:16:42Z</dc:date>
    </item>
  </channel>
</rss>

