I wants to delete columns that all rows show the same value. So, I start with creating a list of those columns (range == 0). When I run the script, things work ok until I delete columns. JMP show scriptable but it doesn't delete.
names default to here (1);
dt = current data table ();
for (i= n col (dt), i >= 1, i--,
if( (col N missing (column (i)) / N Rows() ) > 0.8,
dt << delete columns (i)
)
);
ColList1 = dt << get column names(continuous);
dt << summary(
range(eval(ColList1)),
output table("range")
);
Empty = {};
ColList = data table("range") << get column names(continuous);
for(i=1,i<=n items(ColList),i++,
col = column(ColList[i]);
if(col[1] ==0, insert into(Empty,ColList[i]))
);
dt << delete columns(Empty);