[R] Reading in a table with ISO-latin1 encoding in MacOS-X (Intel)

Antti Arppe aarppe at ling.helsinki.fi
Thu Jun 22 18:27:39 CEST 2006


Dear colleagues,

With the help of a colleague of mine here in Helsinki (Seppo Nyrkkö) 
who looked at innards of the R source code for Mac it turned out that 
this was indeed an issue concerning the Mac locale and its settings 
and not R.

Though we had tried this earlier by changing the LANG variable to 
'fi_FI', we hadn't looked hard enough in the available encodings (with 
locale -a) to select the exactly correct value, being:

LANG=fi_FI.IS08859-1;
export LANG;

With this configuration R was able to happily read in my original 
table with the Scandinavian characters in the header, without no 
fuss.

Thanks for your advice, and wishing all a good Midsummer,

 	-Antti Arppe

On Thu, 8 Jun 2006, Peter Dalgaard wrote:
> so one can only guess that you have a local or Mac-specific setup
> issue.
On Thu, 8 Jun 2006, Prof Brian Ripley wrote:
> If so, you need to investigate the locale in use, as which letters are valid
> depends on the locale: on Linux UTF-8 locales all letters in all languages
> are valid in R names, but that is not necessarily the MacOS interpretation.
> (Invalid characters in names will be converted to ., and if the locale is
> wrong so may be the interpretation of bytes as characters.)
> You might find more informed help on the r-sig-mac list.



More information about the R-help mailing list