Saturday, February 02, 2013

Speech impediment - Locale in R under OSX

My R-installation developed a language problem ("L" is a statistical ploglamming language). The startup message, all errors and system messages started appearing in German. I do speak German but it was still quite annoying. This ended with a work-around that I published previously in a post about R-startup scripts. I have finally figured out what causes the error. My Language & Text settings for language were as follows:
  1. British English 
  2. Swedish
  3. Norwegian
  4. Danish
  5. German 
  6. French 
The problem lies in using the British English locale. I use it because I hate when all programs always correct my excellent spelling from Proper English™ to American. R does not have a locale for British English, nor for Swedish, Norwegian or Danish. So, to R, the locale priority list actually looks like this:

    1.  



    2. German 
    3. French
So, understandably it goes for what it knows. The solution is to extend the list and put a standard English locale high up:
    1. British English
    2. English 
    3. Swedish
    4. Norwegian
    5. Danish
    6. German 
    7. French 

No comments:

Post a Comment