cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Substitute_Comma2Decimal

Should be used when display language setting is ENGLISH and the import has brought in numeric data as character due to the comma. This script converts values with  comma seperator to decimal seperator and changes the data type to continuous.  

 

THIS SCRIPT WILL NOT WORK FOR GERMAN (or other) LANGUAGE SETTING

You will find the script to convert in the other direction commented or under this script in file exchange (Substitute_Decimal2Comma.jsl).

 

There are three files:

  • "HowTo" document "Commal2Decimal.doc"
  • The script file itself "Substitute_Comma2Decimal.jsl"
  • Example Data Table to be used to test the script "Decimal_Comma.jmp"

You might want to use it as base and change the script to fullfill your needs. 

 

Comments
Alfredo

Thanks so much for this VERY USEFUL JSL script !

Update: By the way, as of JMP 15 the RECODE functionality has a new formula generation functionality which is not using a match statement. This allows to use some code like this as base for the transition:

Recode( :Column 6, {Substitute( _rcNow, ",", "." ), Num( _rcNow )} )

or:

Num( Recode( :Column 6, {Substitute( _rcNow, ",", "." )} ) )

Finally you still have to set the modeling type to continuous.

 

Just if you were not aware of it :)

Recommended Articles