Re: If statement comparison statementTo get column values you can send the message Get Values to the column reference. Based on your logic you are trying to only identify the numeric columns. To do this you've defiend a list 'Results' but the list should be terminated with a '}" whereas you have a closing parenthesis ')" (plus you need to terminate the assignment with a semicolon. In fact, it is easier to add an additional keyword numeric to the Get Column Names message. Here is an example:
dt = open("$SAMPLE_DATA/Big Class.jmp");
cols = dt << get column names(string,numeric);
for (i=1,i<=nitems(cols),i++,
data = column(dt,cols[i])<<GETVALUES></GETVALUES>Re: If statement comparison statementIf this case is as simple as getting all the NUMERIC columns, you can send the << Get As Matrix message to the data table.
If statement comparison statementHi! I am having trouble with my if statement below. I was wondering if you guys have any input. Thank you for your help!
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 = {} if ((Result[1] == "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
); (Any ideas on how to better store the column data would also be helpful!)