[R-SIG-Mac] sort() under terminal

Duncan Murdoch murdoch.duncan at gmail.com
Mon Oct 12 17:23:27 CEST 2015


On 12/10/2015 10:59 AM, Adrian Dușa wrote:
> Dear All,
> 
> I tried to search some information about this on Google, but didn't find
> anything yet.
> There seems to be a difference between sorting in the Terminal app and
> sorting in the Rgui:
> 
> In the Terminal:
> 
>> sort(c("W", "e", "E"))
> [1] "E" "W" "e"
>> R.version
>                _
> platform       x86_64-apple-darwin13.4.0
> arch           x86_64
> os             darwin13.4.0
> system         x86_64, darwin13.4.0
> status
> major          3
> minor          2.2
> year           2015
> month          08
> day            14
> svn rev        69053
> language       R
> version.string R version 3.2.2 (2015-08-14)
> nickname       Fire Safety
> 
> 
> 
> In the Rgui:
> 
>> sort(c("W", "e", "E"))
> [1] "e" "E" "W"
>> R.version
>                _
> platform       x86_64-apple-darwin13.4.0
> arch           x86_64
> os             darwin13.4.0
> system         x86_64, darwin13.4.0
> status
> major          3
> minor          2.2
> year           2015
> month          08
> day            14
> svn rev        69053
> language       R
> version.string R version 3.2.2 (2015-08-14)
> nickname       Fire Safety
> 
> 
> Could anyone point me to some information, please?

See the help page for sort, or the page it references, ?Comparison.
Presumably you are running the two instances of R with different locale
settings.

Duncan Murdoch



More information about the R-SIG-Mac mailing list