How I can change the data type from "continous" to "characters" from all the columns in current data table in one JSL sentence ?
For each column(
col,
dt,
If( col << Get Modeling Type == "continous" & Contains( col << Get Name, "Layer Count" ),
col << Set Data Type( Character )
)
);
I tried to ask AI, then i get some proposals, above is one sample, but it is not work. my version is JMP 18
Data Exploration and VisualizationRe: How I can change the data type from "continous" to "characters" from all the columns in current data table in one JSL sentence ?AI is quite bad with JSL, Scripting Index or using JMP to create example script is much better.
Here is basic example
For Each({colname}, Current Data Table() << Get Column Names("Continuous", "String"),
Column(Current Data Table(), colname) << Set Data Type("Character");
);
JMP created script


// Standardize column attributes
Local({old dt = Current Data Table()},
Current Data Table(Data Table("Big Class"));
For Each({col, index}, {:name, :age, :sex, :height, :weight},
col << Set Data Type(Character(7)) << Set Modeling Type("Nominal") <<
Compact()
);
Current Data Table(old dt);
);Re: How I can change the data type from "continous" to "characters" from all the columns in current data table in one JSL sentence ?It works, I learn a new skill, thanks.
KR
Sean