Hi all,
How can I iterate a delete formula then delete column using for loop in list?
Something like this:
col_formula = {"Column1", "Column2" };
col2_row = {"Column3", "Column4"};
For( i = 1, i <= N Items ( col_formula ), i++,
col_formula (i) << Delete Formula //delete formula
col2_row (i) << Delete Row//delete row
);
col_formula = {"Column1", "Column2"};
col2_row = {"Column3", "Column4"};
// This will delete the formula
For( i = 1, i <= N Items( col_formula ), i++,
Column( col_formula[i] ) << Delete Formula; //delete formula
);
// You cannot delete a row within a given column. JMP always has
// an equal number of rows for all columns.
// You can delete a row, but it will delete the row for all columns.
current data table() << delete rows( i );
// If you want to remove the value for a given row within a column,
// you can set the value to a missing value
Hi
I thick this should be work expect your column format might incorrect.
cols={":col_1",":col_2"};
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Bank Loan.jmp" );
:Time << Delete Formula;
col_formula = {"Column1", "Column2"};
col2_row = {"Column3", "Column4"};
// This will delete the formula
For( i = 1, i <= N Items( col_formula ), i++,
Column( col_formula[i] ) << Delete Formula; //delete formula
);
// You cannot delete a row within a given column. JMP always has
// an equal number of rows for all columns.
// You can delete a row, but it will delete the row for all columns.
current data table() << delete rows( i );
// If you want to remove the value for a given row within a column,
// you can set the value to a missing value