I'd like my JMP script to verify col contents are numeric before performing my analysis
Mar 14, 2018 1:23 PM(1080 views)
I have a JMP script that's currently up and running. However i've run into specific circumstances where it pukes due to the presence of a string observation in a col where it's expecting a numeric one.
I'd like my script to check each observation in this column to ensure they are all numeric before attempting to perform the required analysis. If a non-numeric character is found, i'd like to have it deleted.
This problem stems from the fact that the source files generated from my test equipment populates a string when an error occurs.
Edited after @txnelson's post. I forgot to mention the column data type editing .
@Ainaskid, Hello, I would try the following. Essentially if you know anything that is a string in your column is invalid or error, model the column as numeric and hide or exclude the strings as shown below.
Clear Globals(); Clear Log();
dt = Current Data Table();
Col = Column(dt,"Test"); // assuming column "Test" is the desired column
Col << Data Type("Numeric) << Set Modeling Type("Continuous");
dt << select Where(IsMissing(:Test));
dt << Hide and Exclude ; // Can also delete