Hi! I am having trouble with putting my if statement in my for loop. I want my if statement to evalaute which elements in the array matches the word "Continuous", and store that column's data in a seperate array/list ( a suggestion for the best way to store coloumn data would also be helpful). I'd appreciate any help! Thanks.
Column Data = {};
for(i= 0, i <= ncol, i++,
if ((Result[i] == "Continuous"),
ColumnData = Column(columnName[i])
);
);
Names Default To Here( 1 );
dt = Open(Example.jmp");
columnName = dt << Get Column Names (String);
ncol = 4;
Result = {"Continuous", "Continuous", "Categorical", "Continuous") // this is variable
ColumnData = {};
for(i= 0, i <= ncol, i++,
if ((Result[i] == "Continuous"), // i am getting an error for this statement
ColumnData = Column(columnName[i])
// i want to store just column data and put it into a matrix, and perform operations on it
);
);Thank you for your quick response. I apologize for not providng enough details earlier. Are you able to tell what is wrong with the code above? I appreciate your help.