On Fri, 28 May 2010 01:17:49 -0700 (PDT)
carslaw david.cars...@kcl.ac.uk wrote:
[4] HGV-D-Euro-III HGV-D-Euro-IV EGR HGV-D-Euro-IV SCR
[4] HGV-D-Euro-III HGV-D-Euro-IV EGR HGV-D-Euro-IV SCR
[7] HGV-D-Euro-IV SCRb HGV-D-Euro-V EGR HGV-D-Euro-VI
[7] HGV-D-Euro-IV SCRb
Dear R users,
I'm a bit perplexed with the effect sort has here, as it is different on
Windows vs. linux.
It makes my factor levels and subsequent plots different on the two systems.
Given:
types - c(PC-D-Euro-0, PC-D-Euro-1, PC-D-Euro-2, PC-D-Euro-3,
PC-D-Euro-4, PC-D-Euro-5, PC-D-Euro-6,
On 28-May-10 08:17:49, carslaw wrote:
Dear R users,
I'm a bit perplexed with the effect sort has here, as it is different
on Windows vs. linux.
It makes my factor levels and subsequent plots different on the two
systems.
Given:
types - c(PC-D-Euro-0, PC-D-Euro-1, PC-D-Euro-2,
In my response cited below:
On 28-May-10 09:55:36, Ted Harding wrote:
I suspect the result (in Linux, I can't test this on Windows)
may be related to the following phenomenon:
sort(c(AB CD,ABCD))
# [1] ABCD AB CD
sort(c(AB CD,ABCD ))
# [1] AB CD ABCD
I.e. ABCD precedes AB CD
Thanks Ted,
Indeed, there is a difference between the systems on your much-simplified
example (thanks).
So, linux:
sort(c(AB CD,ABCD))
[1] ABCD AB CD
Windows:
sort(c(AB CD,ABCD))
[1] AB CD ABCD
Regards,
David
--
View this message in context:
carslaw wrote:
Dear R users,
I'm a bit perplexed with the effect sort has here, as it is different on
Windows vs. linux.
It makes my factor levels and subsequent plots different on the two systems.
You are using different collation orders. On Linux, your sessionInfo shows
en_GB.utf8
Pretty obvious: You use different locales (collate). What happens if you use
the same on both machines?
Cheers
Joris
On Fri, May 28, 2010 at 10:17 AM, carslaw david.cars...@kcl.ac.uk wrote:
Dear R users,
I'm a bit perplexed with the effect sort has here, as it is different on
...
the
It would seem that there is indeed a locale effect. Revisiting the
examples I used on Linux in a previous post, at which time I was
using the default LC_COLLATE=en_GB.UTF-8, I changed this to C.
Both the C and the en_GB.UTF-8 are indicated (the latter copied
from my previous post):
An experiment:
sort(c(AACD,A CD))
# [1] AACD A CD
sort(c(ABCD,A CD))
# [1] ABCD A CD
sort(c(ACCD,A CD))
# [1] ACCD A CD
sort(c(ADCD,A CD))
# [1] A CD ADCD
sort(c(AECD,A CD))
# [1] A CD AECD
## (with results for AFCD, ... AZCD similar to the last two).
On 28/05/2010 9:24 AM, (Ted Harding) wrote:
An experiment:
sort(c(AACD,A CD))
# [1] AACD A CD
sort(c(ABCD,A CD))
# [1] ABCD A CD
sort(c(ACCD,A CD))
# [1] ACCD A CD
sort(c(ADCD,A CD))
# [1] A CD ADCD
sort(c(AECD,A CD))
# [1] A CD AECD
## (with results for AFCD, ...
On 28-May-10 14:37:39, Duncan Murdoch wrote:
On 28/05/2010 9:24 AM, (Ted Harding) wrote:
An experiment:
sort(c(AACD,A CD))
# [1] AACD A CD
sort(c(ABCD,A CD))
# [1] ABCD A CD
sort(c(ACCD,A CD))
# [1] ACCD A CD
sort(c(ADCD,A CD))
# [1] A CD ADCD
sort(c(AECD,A
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Ted Harding
Sent: Friday, May 28, 2010 1:15 PM
To: r-help@r-project.org
Cc: carslaw
Subject: Re: [R] difference in sort order linux/Windows (R.2.11.0)
On 28-May-10 14:37:39
Linux problem solved! (For me at any rate). Thanks to some hints
from my Linux contacts it transpires that the problem with
sort EOT
ABCD
A CD
EOT
# ABCD
# A CD
sort EOT
ADCD
A CD
EOT
# A CD
# ADCD
arises because, by default, the is ignored in sorting. Therefore
in the first case it sorted
13 matches
Mail list logo