I'd like my JMP script to verify col contents are numeric before performing my analysisHello Community,
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.
Your help/time is greatly appreciated.
Regards,
Olu.
Re: I'd like my JMP script to verify col contents are numeric before performing my analysisThanks for the quick response. I'll try it out shortly and let you know.
Thanks,
Olu.
Re: I'd like my JMP script to verify col contents are numeric before performing my analysisThe following will convert the suspect column to a numeric, and when it does this, it will automatically convert any values that can not be converted to numeric to a missing value
Clear Globals(); Clear Log();
dt = Current Data Table();
Column(dt,"Test")<<DATA type=""></DATA>
Re: I'd like my JMP script to verify col contents are numeric before performing my analysisEdited 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
<BR />Col << Data Type("Numeric) << Set Modeling Type("Continuous"); <BR />
dt << select Where(IsMissing(:Test));
dt << Hide and Exclude ; // Can also delete