Thought I figured out a solution with my last post, but it turns out the problem is more complicated than I thought. I created an array of strings, based on the values contained in one of my columns. Then, I want to loop over the Bivariate() funtion, iterating through array values while passing them into the Where-clause. When I run the script, the Splines are generated correctly, however, the {save predicteds} command does not work properly. The only predicteds that are saved belong to the last element of the array, and not the other elements. It appears that {save predicteds} only runs once, at the end of my for loop/only for the last element of ProcessArray, instead of running for ever iteration of the for loop/every element of ProcessArray.
l = 0;
Proc = "new";
ProcessArray = {};
DataCV=open("C:\Desktop\JMP\sample_data.csv")<BR />
For (l = 1, l < 32521, l++, // Create array of strings
if (proc == (Row()=l; :process),
print("same process"),
Insert Into(processArray, (Row()=l; :process)); proc = (Row()=l; :process); Show(proc)
);
);
for (n = 1, n <= length(processArray), n++, // Create and save multiple splines, for all values of ProcessArray[]
Bivariate(
Y( :c_mm_deembed_pf ),
X( :v_dut_volt ),
Where( :c_type == "Cdg" & :process == ProcessArray[n] ),
Fit Spline( 0.1, standardized, {save predicteds})
);
);
