Hi,
I am trying to build a table in JSL from a data file using the file's first line of data to determine the data type. However I am not able to create new columns in script with types other than Numeric. This works:
dt << New Column("test", Character, Nominal)However, this (simplified example) only generates Numeric columns:
cols = {"A", "B", "C"};
type = {};
For(i = 1, i <= N Items(cols), i = i + 1,
type[i] = Match(cols[i],
"A", Expr(Character),
Expr(Numeric);
);
);
For(i = 1, i <= N Items(cols), i = i + 1,
dt << New Column(cols[i], Eval(type[i]), Nominal);
);The expected behavior would be to create one Character column and two Numerics. What causes the expression type[i] to be ignored here?