Hi
I have 2 columns, one containing numeric values, and one containing strings.
I want to create a third column that takes the numeric value if the string value is 'parametric', and the string value if it's not.
I tried this, but I'm getting an error "Column TEST_RESULT requires numeric values", although it's defined as Character type column.
I'm using JMP15 if it matters.
col_test_result =dt <<new column ("TEST_RESULT",Character);
Column(dt_subset,"TEST_RESULT")<<set formula(if(:COMMENTS=="Parametric",:NUMERIC_RESULT,:COMMENTS));
Later on I want to split this column so the output table will have either numeric or character type data, will JMP be able to set it to numeric based
on the contents although the source column was character?
The R followed by an all numeric value is being interpreted by JMP as a currency. The South African Rand's notation is in the form: R123 or R55.67 etc. So JMP is interpreting it as numeric values. You could add a check to the code to check for this exception.
wow I didn't see this coming
JMP 17 will have an optional argument for num("R001", <<Restrict) to prevent this behavior.