Hi,
despite looking into many discussions / the scripting index .., I could not get an answer, how to write a JSL script, that will take over the new column command enabling to enter sequence data with N times repetition of each value. I know how to do it manually - thanks to a reply from Mark B... in one of those discussions, but I struggle to write a script
e.g.
N_DOE= 10
N_XRF =4
=> {1,1,1,1,2,2,2,2,3,3,3,3, ...10,10,10,10}
//How may I get a column with repeating values
dt=current data table();
N_DOE=10;
N_XRF=4;
seq = sequence(1,N_DOE,1,N_XRF);
dt << new column("Run", "numeric", "ordinal");
//dt:run << set each value(seq,); // this works, but it is just"1" for all rows
dt:run << set each value(i=1,i<N_DOE,i++, seq);
//dt:run << set each value(for(i=1,i<N_DOE,i++, seq));
//dt << new column("Run", "numeric", "ordinal", values(repeat(seq));
//dt << new column("Run", "numeric", "ordinal", values(repeat(for(i=1,i<N_DOE,i++, seq))));
//dt << new column("Run", "numeric", "ordinal", for each row(for(i=1,i<N_DOE,i++, seq)));
//dt << new column("Run", "numeric", "ordinal", for each row(seq));