I uploaded the data file(i imported into XL while running my script) that I used in the above script
My script is:-
Clear Globals();
dt = open();
k=5;
collect_means = {};collect_stdevs = {};collect_group_std={};
For( l = 1, l <= 2, l++,
show(k);
For( i = 1, i <= 3, i++, //3 times
nt = dt << Subset(
Output Table( "Subset" ),
Sample Size( k ), //samples of 5
);
Summarize( m = Mean( :Data ), s = Std Dev( :Data ) );
Insert Into( collect_means, m,0 );
Insert Into( collect_stdevs, s,0 );
// close("subset", nosave);
);
New Table("Final",
New Column( "means", set values( collect_means )),
New Column( "stddevs", set values( collect_stdevs )),
//New Column("Group Std",Formula(col std dev(:means)))
);
//pt << Summary( Group, Std Dev( :means ) );
pt=Data Table("Final")<< summarize(p=std dev(:means));
Insert Into(collect_group_std,p,0);
//close("Final",nosave);
k=k+5;
);
New Table("Groups",New Column( "Summary Group", set values( collect_group_std )));
The "Final" sheet in the above script has to be updated everytime when the outer For loop runs. But now, the "FInal Sheet' is not getting updated and using the previous "Final" sheet (using the sheet from the previous iteration.) Can some one help so that "Final" sheet is updated with new values everytime.