All,
I am using JMP 13.1.0 on a Windows 7 machine.
I am trying to add rows to a data table after a specific row.
According to the documentation (http://www.jmp.com/support/help/13-2/Add_Rows_2.shtml) that I am referencing, the correct way to do that is :
dt << Add Rows( 3, 10 ); /* add 3 rows after the 10th row, moving the 11th and lower rows farther down */
Now , I expand on that to do this :
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 << Add Rows(RowStyle1,RowIndex); // Add Rows .
The result of this piece of code is shown in the screeshot below :
Shouldn't the row be added after row 1 - essentially moving rows 2 through 40 down ?
Can someone point out what i am doing wrong here?
Also - would like to add one more question on Add Rows() :
RowStyle2 = {:name = "Mark",:age = 12,:sex = "M",:height = 80,:weight = :weight[1]/2}; // Define Row To Add
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.
Best
Uday