Creating Control Charts in a loopHello,
I have a large data table that I need to create control charts for. I need a new control chart for every column with the first column in the data table being the Sample Label.
I have searched and found similar posts that I tried to recreate for my purpose but haven't had any luck. If someone could tell me where I am going wrong with my code that would be great.
I am still pretty new to jmp scripting so please feel free to tell me if I am using sloppy syntax as well.
Current Data Table(dt5);
Rcols = dt5 << GetColumnNames(Numeric);
nw= New Window("Control Charts", myVLB = V List Box());
For(i=1, i<=nitems(Rcols), i++,
cc = Control Chart(
Sample Label( Column(dt5, Rcols[1] ) ),
KSigma( 3 ),
Chart Col( Column( Rcols[i] ) ),
Levey Jennings);
myVLB << Append(Report(cc));
);
Re: Creating Control Charts in a loopAwesome this worked thank you!
Re: Creating Control Charts in a looptry this one
Names Default To Here( 1 );
dt5 = Current Data Table();
Rcols = dt5 << GetColumnNames( Numeric );
nw = New Window( "Control Charts", myVLB = V List Box() );
For( i = 1, i <= N Items( Rcols ), i++,
cc = Control Chart(
Sample Label( Column( dt5, Rcols[1] ) ),
KSigma( 3 ),
Chart Col( Column( dt5, Rcols[i] ), Levey Jennings )
);
myVLB << Append( Report( cc ) );
cc << close window;
);