Re: [Rd] split() - unexpected sorting of results

2017-10-20 Thread Rui Barradas
Hello, In order to solve that problem of sorting numerics made characters there is package stringr, functions str_sort and str_order. library(stringr) set.seed(2447) x <- sample(11L) sort(as.character(x)) [1] "1" "10" "11" "2" "3" "4" "5" "6" "7" "8" "9" str_sort(as.character(x), nu

Re: [Rd] split() - unexpected sorting of results

2017-10-20 Thread Hervé Pagès
Hi, On 10/20/2017 12:53 PM, Peter Meissner wrote: Thanks, for the explanation. Still, I think this is surprising bahaviour which might be handled better. Maybe a little surprising, but no more than: > x <- sample(11L) > sort(x) [1] 1 2 3 4 5 6 7 8 9 10 11 > sort(as.character(x))

Re: [Rd] split() - unexpected sorting of results

2017-10-20 Thread Peter Meissner
Thanks, for the explanation. Still, I think this is surprising bahaviour which might be handled better. Best, Peter Am 20.10.2017 9:49 nachm. schrieb "Iñaki Úcar" : > Hi Peter, > > 2017-10-20 21:33 GMT+02:00 Peter Meissner : > > Hey, > > > > I found this - for me - quite surprising and puzzling

Re: [Rd] split() - unexpected sorting of results

2017-10-20 Thread Iñaki Úcar
Hi Peter, 2017-10-20 21:33 GMT+02:00 Peter Meissner : > Hey, > > I found this - for me - quite surprising and puzzling behaviour of split(). > > > split(1:11, as.character(1:11)) > split(1:11, 1:11) > > > When splitting by numerics everything works as expected - sorting of input > == sorting of ou

[Rd] split() - unexpected sorting of results

2017-10-20 Thread Peter Meissner
Hey, I found this - for me - quite surprising and puzzling behaviour of split(). split(1:11, as.character(1:11)) split(1:11, 1:11) When splitting by numerics everything works as expected - sorting of input == sorting of output -- but when using a character vector everything gets re-sorted alph

[Rd] Rscript Bug Report (improper parsing of [args])

2017-10-20 Thread Trevor Davis
Hi, A user of my `optparse` package discovered a bug in Rscript's parsing of [args]. (https://github.com/trevorld/optparse/issues/24) I've reproduced the bug on my machine including compiling and checking the development version of R. I couldn't find a mention of it in the Bug Tracker or New Fea

Re: [Rd] Another issue with Sys.timezone

2017-10-20 Thread Stephen Berman
On Fri, 20 Oct 2017 09:15:42 +0200 Martin Maechler wrote: >> Stephen Berman >> on Thu, 19 Oct 2017 17:12:50 +0200 writes: > > > On Wed, 18 Oct 2017 18:09:41 +0200 Martin Maechler > > wrote: > >>> Martin Maechler > >>> on Mon, 16 Oct 2017 19:13:31 +0200 writ

Re: [Rd] Illegal Logical Values

2017-10-20 Thread Martyn Plummer
On Fri, 2017-10-20 at 14:01 +, brodie gaslam via R-devel wrote: > I'm wondering if WRE Section 5.2 should be a little more explicit > about misuse of integer values other than NA, 0, and 1 in LGLSXPs. > I'm thinking of this passage: > > > Logical values are sent as 0 (FALSE), 1 (TRUE) or INT_

Re: [Rd] Bug: Issues on Windows with SFN disabled

2017-10-20 Thread Tomas Kalibera
This has now been mostly fixed in R-devel. What remains to be resolved is that some packages with custom make files cannot be installed from source (when R is installed into a directory with space in its name and short file names are not available) Tomas On 10/17/2017 10:37 AM, Tomas Kali

[Rd] Illegal Logical Values

2017-10-20 Thread brodie gaslam via R-devel
I'm wondering if WRE Section 5.2 should be a little more explicit about misuse of integer values other than NA, 0, and 1 in LGLSXPs.  I'm thinking of this passage: > Logical values are sent as 0 (FALSE), 1 (TRUE) or INT_MIN = -2147483648 (NA, > but only if NAOK is true), and the compiled code s

Re: [Rd] Another issue with Sys.timezone

2017-10-20 Thread Martin Maechler
> Stephen Berman > on Thu, 19 Oct 2017 17:12:50 +0200 writes: > On Wed, 18 Oct 2017 18:09:41 +0200 Martin Maechler wrote: >>> Martin Maechler >>> on Mon, 16 Oct 2017 19:13:31 +0200 writes: > (I also included a reply to part of this response of yours below.)