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
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))
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
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
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
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
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
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_
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
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
> 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.)
11 matches
Mail list logo