Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-24 Thread Mark van der Loo
The 'stringi' package claims robust cross-platform performance. It exports much functionality of the ICU library and will attempt to install it when not present. The function 'stri_sort' accepts a collation argument that can be defined with 'stri_opts_collator'. On Sun, Nov 23, 2014 at 5:15

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-23 Thread peter dalgaard
On 23 Nov 2014, at 01:05 , Henrik Bengtsson h...@biostat.ucsf.edu wrote: On Sat, Nov 22, 2014 at 12:42 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 22/11/2014, 2:59 PM, Stuart Ambler wrote: A colleague¹s R program behaved differently when I ran it, and we thought we traced it

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-23 Thread Prof Brian Ripley
On 23/11/2014 09:39, peter dalgaard wrote: On 23 Nov 2014, at 01:05 , Henrik Bengtsson h...@biostat.ucsf.edu wrote: On Sat, Nov 22, 2014 at 12:42 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 22/11/2014, 2:59 PM, Stuart Ambler wrote: A colleague¹s R program behaved differently when

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-23 Thread Martin Morgan
For many scientific applications one is really dealing with ASCII characters and LC_COLLATE=C, even if the user is running in non-C locales. What robust approaches (if any?) are available to write code that sorts in a locale-independent way? The Note in ?Sys.setlocale is not overly optimistic

[Rd] R string comparisons may vary with platform (plain text)

2014-11-22 Thread Stuart Ambler
A colleague¹s R program behaved differently when I ran it, and we thought we traced it probably to different results from string comparisons as below, with different R versions. However the platforms also differed. A friend ran it on a few machines and found that the comparison behavior didn¹t

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-22 Thread Duncan Murdoch
On 22/11/2014, 2:59 PM, Stuart Ambler wrote: A colleague¹s R program behaved differently when I ran it, and we thought we traced it probably to different results from string comparisons as below, with different R versions. However the platforms also differed. A friend ran it on a few

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-22 Thread Stuart Ambler
You mean where it says that some platforms may not respect the locale (I assume, though don’t know, that en_US.UTF-8 and en_US.utf8 would be the same)? But I gather that the general problem has been looked into and is difficult to solve; thanks. On 11/22/14, 12:42 PM, Duncan Murdoch

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-22 Thread Henrik Bengtsson
On Sat, Nov 22, 2014 at 12:42 PM, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 22/11/2014, 2:59 PM, Stuart Ambler wrote: A colleague¹s R program behaved differently when I ran it, and we thought we traced it probably to different results from string comparisons as below, with different R