[prev in list] [next in list] [prev in thread] [next in thread]
List: r-devel
Subject: Re: [Rd] R-3.2.4 Mac/Linux different in < on characters
From: David Winsemius <dwinsemius () comcast ! net>
Date: 2016-03-12 5:50:28
Message-ID: 3ED54186-ACFC-4071-BE1C-778034F81DF1 () comcast ! net
[Download RAW message or body]
> On Mar 11, 2016, at 6:52 PM, Mick Jordan <mick.jordan@oracle.com> wrote:
>
> Linux:
> > x<-c("0","1");y<-c("a","-1"); x<y
> [1] TRUE TRUE
>
> Mac:
>
> x<-c("0","1");y<-c("a","-1"); x<y
> [1] TRUE FALSE
>
On a Mac (and noting the the documentation [somewhere that I cannot find right now] \
warns us the the collation sequence for characters is OS dependent):
require(R.oo)
charToInt("-")
#[1] 45
charToInt("1")
#[1] 49
>
> On both systems, LC_COLLATE/LC_CTYPE/LANG are set to en_US.UTF-8
>
> In Java,FWIW, I get the Mac answer if I use String.compareTo and the Linux answer \
> if I use Collator.compareTo, but the result is consistent on Mac and Linux.
> Mick Jordan
>
> ______________________________________________
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
David Winsemius
Alameda, CA, USA
______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic