Function to Count Rows Within Spec
I want to create a function that reads in a column, checks the number in each row on whether it is within spec, and output the passing count/total count/percentages. This is what I have:count_in_spec = Function( { col, lsl, usl },
a=0; //pass count
b=0; //all count
for( i = 1, i <= N Rows(col), i++,
if( col[i] >= lsl & col[i] <= usl, a++ );
if( not(ismissing(col[i])), b++ );
);
pctpass =
...