Using a for loop to reference different columns?<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi All,
I would like "transpose" a column from data table to another data table. In the first data table, I have my data in a column, and I would like to organize it horizontally in the other data table starting in the second column (named 0V). I am using a for loop to reference the different column names, but it not filling the row with data.
for(j=1, j<=66, j++,
id = dtDevice:Id_A;
name = char((i-1)*10)||"V";
dtSummary:name[row]=id;
);
Any suggestions?
Re: Using a for loop to reference different columns?I had the row assigned before the loop and I added rows, too. The problem was that I was using j not k. I had no idea it was a function! Thank you so much.
Re: Using a for loop to reference different columns?You are using a variable row without assigning it to anything. I wouldn't use j as a looping variable - it's a function in JMP. Finally you need to add rows as shown below.
for(k=1, k<=66, j++,
id = dtDevice:Id_A;
name = char((k-1)*10)||"V";
dtSummary << add rows(1);
dtSummary:name=id;
);