[R-sig-Debian] Changing locale?
Michael Rutter
mar36 at psu.edu
Sat Apr 17 16:22:42 CEST 2010
Matthieu,
Finally found the solution. This is an Ubuntu issue, so this would
effect other programs as well, but I was able to change the locale in
R by doing the following:
sudo gedit /var/lib/locales/supported.d/local
Add "de_DE.utf8 UTF-8" to the file. Save and exit.
Then execute:
sudo dpkg-reconfigure locales
This will take a minute or so. I was then able to change locales in R
without being root. Full credit goes to this webpage:
http://blog.andrewbeacock.com/2007/01/how-to-change-your-default-locale-on.html
Michael
On Thu, Apr 15, 2010 at 9:57 AM, Matthieu Stigler
<matthieu.stigler at gmail.com> wrote:
> Hi
>
> I need for a specific application to change the locale of R 2.9.2 in Ubuntu
> 9.04. Trying the example in ?Sys.setlocale:
> Sys.setlocale("LC_TIME", "de_DE.utf8")
> [1] ""
> Warning message:
> In Sys.setlocale("LC_TIME", "de_DE.utf8") :
> la requête OS pour spécifier la localisation à "de_DE.utf8" n'a pas pu être
> honorée
>
> I tried the code line for windows on R windows (Sys.setlocale("LC_TIME",
> "German")) and it worked. Does it mean that the basic installation (from
> ubuntu repo) does not provide those locales? Or did I do something wrong?
>
> Thanks a lot!
>
> Matthieu
>
> sessionInfo()
> R version 2.9.2 (2009-08-24)
> i486-pc-linux-gnu
>
> locale:
> LC_CTYPE=C;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=fr_FR.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=fr_FR.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
> other attached packages:
> [1] Revobase_0.2-1
>
> _______________________________________________
> R-SIG-Debian mailing list
> R-SIG-Debian at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-debian
>
--
Dr. Michael A. Rutter
School of Science
Penn State Erie, The Behrend College
Station Road
Erie, PA 16563
http://math.bd.psu.edu/faculty/rutter
More information about the R-SIG-Debian
mailing list