[R] R 15.0 Warning message.

peter dalgaard pdalgd at gmail.com
Sun Jun 3 11:11:30 CEST 2012


On Jun 3, 2012, at 10:27 , Jinyan Huang wrote:

> Yes. I think it is my environment variables problem. But I donot know
> how to fix.
> 
> echo $LC_ALL
> 
> echo $LANG
> en_US.UTF-8
> 
> 
> On Sun, Jun 3, 2012 at 4:07 PM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>> LANG

First, use "locale" to check that the above is the full story.

For finding the right locale, try starting R with, e.g.

LANG=en_US.utf8 R

or, for a more scientific approach, find your system locale database, usually /usr/share/locale, and look for a suitable name:

pd$ ls -ld /usr/share/locale/en_US*
drwxr-xr-x  8 root  wheel  272 Sep 25  2010 /usr/share/locale/en_US
drwxr-xr-x  8 root  wheel  272 Sep 25  2010 /usr/share/locale/en_US.ISO8859-1
drwxr-xr-x  8 root  wheel  272 Sep 25  2010 /usr/share/locale/en_US.ISO8859-15
drwxr-xr-x  8 root  wheel  272 Sep 25  2010 /usr/share/locale/en_US.US-ASCII
drwxr-xr-x  8 root  wheel  272 Sep 25  2010 /usr/share/locale/en_US.UTF-8

so on a Mac like mine, en_US.UTF-8 should do just fine, but if you see .utf8, .UTF8, .utf-8, you'll have to adjust LANG accordingly. 

For a permanent fix, edit the appropriate startup file for your shell, probably .profile, cor maybe .bash_profile or .bashrc.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list