[R-SIG-Mac] Bug related to locale changes.

Rainer M Krug Rainer at krugs.de
Mon Jun 8 14:43:12 CEST 2015


Berend Hasselman <bhh at xs4all.nl> writes:

>> On 08-06-2015, at 13:40, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:
>> 
>> I posted this to R-devel yesterday; from responses received, it appears
>> to be OSX-specific (maybe Mavericks-specific).
>> 
>> In an R session started from the terminal with R --vanilla, I see this:
>> 
>>> Sys.setlocale(locale="en_CA")
>> [1] "en_CA/en_CA/en_CA/C/en_CA/en_CA.UTF-8"
>>> "320" > "300"
>> [1] NA
>>> "320" > "300"
>> [1] TRUE
>> 
>> The first string comparison after the locale change produces NA, while
>> later ones are fine.
>> 
>
> I see the similar things on R version 3.2.0 Patched (2015-05-11 r68355)
>
>> Sys.setlocale(locale="en_CA")
> [1] "en_CA/en_CA/en_CA/C/en_CA/en_GB"
>> "320" > "300"
> [1] NA
>> "320" > "300"
> [1] TRUE

Confirmed on Yosemite:

,----
| > Sys.setlocale(locale="en_CA")
| [1] "en_CA/en_CA/en_CA/C/en_CA/en_US.UTF-8"
| > "320" > "300"
| [1] NA
| > "320" > "300"
| [1] TRUE
| > version
|                _
| platform       x86_64-apple-darwin14.3.0
| arch           x86_64
| os             darwin14.3.0
| system         x86_64, darwin14.3.0
| status
| major          3
| minor          2.0
| year           2015
| month          04
| day            16
| svn rev        68180
| language       R
| version.string R version 3.2.0 (2015-04-16)
| nickname       Full of Ingredients
`----

>
>
> Berend

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20150608/7c02751e/attachment.bin>


More information about the R-SIG-Mac mailing list