cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
David_Burnham
Super User (Alumni)

Comma as a Decimal Point

In many/most parts of the world a comma is used to indicate a decimal place rather than a period.  I know that JMP supports this through the support of regional settings, but I don't what what happens in practice.

 

A couple of specific questions:

 

1. Is the regional setting respected when typing data into a JMP table i.e. for PI you would enter 3,14

 

2. If I use the char function to convert this value to a string would I have "3.14" or "3,14" ?

 

3. If I have a table containing commas and they were intended to be decimal places, what is the likely cause (regional settings on the computer or settings inside JMP)?

 

- Dave

 

-Dave
7 REPLIES 7
Byron_JMP
Staff

Re: Comma as a Decimal Point

Dave,

I ran into an issue one time where the table only contained commas instead of decimal places. I think it was from an older Mac database or something.

 

it was a mess, so I used this little bit of python code to "fix" the file before I brought it into JMP

I suppose a clever person could just submit the python from JMP too.

 

f = open('/Users/bywing/Byron Wingerd/Jupyter/Data/intable.txt','r')
filedata = f.read()
f.close()
newdata = filedata.replace(".",",")
f = open('/Users/bywing/Byron Wingerd/Jupyter/Data/outtable.txt','w')
f.write(newdata)
f.close()
JMP Systems Engineer, Health and Life Sciences (Pharma)
David_Burnham
Super User (Alumni)

Re: Comma as a Decimal Point

Thanks Byron

 

Whilst I do have some specific technical issues that I am trying to understand, my view is that I am dealing with my lack of cultural understanding rather than a one-off fix.

 

I've tried customising my regional settings to use "," as the decimal delimiter.

 

Now in answer to my questions I have

 

1/ No the regional setting is not respected - I have to type 3.14 into a column - although it gets rendered as 3,14

 

2/ Instead of using char, I just did 'getValues' and all value have "." as the decimal delimiter even though they are displayed as ","

 

The answer to (2) is good news for me in terms of working with scripts; I'm surprised by answer to (1) to the extent that I don't believe I have fully configured my system - perhaps I need to do more than just change a regional setting?

 

And the specific reason for asking the question is that I have a case where, in code, numbers are appearing with "," instead of "." and I'm not sure the root cause of that.

 

 

-Dave

Re: Comma as a Decimal Point

Hi David,

if you are using JMP from a localized OS (in my case Windows 10 Italian) with localized system preferences, and you are running JMP in English language, you can switch from comma notation to dot notation even at run time by selecting: Preferences -> Windows  Specific -> Display Language: English.

There is a check box right below called "Use JMP language rather than System locale settings for number, date and currency formats".

If it is turned on, it will use dots as decimal points and override the normal codification for that OS, otherwise it will use commas as default.

I use this trick to successfully import US-formatted CSV numeric data, then when I have the JMP tables with Numeric variables I switch back to commas un-clicking the check box above.

Then I can also switch back Language to Italian - that trick works only with English menu: with localized interface, System and Interface language match, so no way in this case to see a dot as a decimal point.

Hope this helps, Massimo

 

David_Burnham
Super User (Alumni)

Re: Comma as a Decimal Point

Thanks Massimo

 

Let's take the case where you have your localised settings and you haven't asked JMP to ignore regional preferences.  In this case decimals will be displayed with a comma.  To enter a numeric column directly into a table can you type "3,14" or do you still have to type "3.14" ?

 

- Dave

 

 

-Dave

Re: Comma as a Decimal Point

Hi Dave,
in Italian settings, I have to type "3,14" to have Pi.
If I type "3.14" I have 03/2014 as a result (just tried)
Bye, Massimo
Byron_JMP
Staff

Re: Comma as a Decimal Point

@MassimoMartucci   Thanks for posting that clarification. Super helpful to know that's a potential issue out there.

JMP Systems Engineer, Health and Life Sciences (Pharma)
Nils
Level I

Re: Comma as a Decimal Point

Hello, I currently have the problem that I need to change all "," to "." in my plots. I am working on a Mac and so I have not found the settings in the preferences. Do you know how to change the settings on a Mac?