Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Avi Gross via R-devel
After seeing what others are saying, it is clear that you need to carefully think things out before designing any implementation of a more native concatenation operator whether it is called "+' or anything else. There may not be any ONE right solution but unlike a function version like paste()

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Bill Dunlap
>I think a lot of these things ultimately mean that if there were to be a string >concatenation operator, it probably shouldn't have behavior identical to >paste0. Was that what you were getting at as well, Bill? Yes. On Mon, Dec 6, 2021 at 4:21 PM Gabriel Becker wrote: > As I recall, there

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread David Scott
I am surprised nobody so far has mentioned glue which is an implementation in R of a python idiom. It is a reverse import in a great number of R packages on CRAN. It specifies how some of the special cases so far considered are treated which seems an advantage: > library(glue) > glue(NA, 2)

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Gabriel Becker
As I recall, there was a large discussion related to that which resulted in the recycle0 argument being added (but defaulting to FALSE) for paste/paste0. I think a lot of these things ultimately mean that if there were to be a string concatenation operator, it probably shouldn't have behavior

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Bill Dunlap
Should paste0(character(0), c("a","b")) give character(0)? There is a fair bit of code that assumes that paste("X",NULL) gives "X" but c(1,2)+NULL gives numeric(0). -Bill On Mon, Dec 6, 2021 at 1:32 PM Duncan Murdoch wrote: > On 06/12/2021 4:21 p.m., Avraham Adler wrote: > > Gabe, I agree that

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Duncan Murdoch
On 06/12/2021 4:21 p.m., Avraham Adler wrote: Gabe, I agree that missingness is important to factor in. To somewhat abuse the terminology, NA is often used to represent missingness. Perhaps concatenating character something with character something missing should result in the original

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Avraham Adler
Gabe, I agree that missingness is important to factor in. To somewhat abuse the terminology, NA is often used to represent missingness. Perhaps concatenating character something with character something missing should result in the original character? Avi On Mon, Dec 6, 2021 at 3:35 PM Gabriel

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Gabriel Becker
Hi All, Seeing this and the other thread (and admittedly not having clicked through to the linked r-help thread), I wonder about NAs. Should NA "hi there" not result in NA_character_? This is not what any of the paste functions do, but in my opinoin, NA + seems like it should be NA (not

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Radford Neal
> > In pqR (see pqR-project.org), I have implemented ! and !! as binary > > string concatenation operators, equivalent to paste0 and paste, > > respectively. > > > > For instance, > > > > > "hello" ! "world" > > [1] "helloworld" > > > "hello" !! "world" > > [1] "hello world"

[Rd] Great overhead for setTimeLimit?

2021-12-06 Thread Jiefei Wang
Hi all, >From the document of 'setTimeLimit', it states "Setting any limit has a small overhead – well under 1% on the systems measured.", but something is wrong with my benchmark code, enabling the time limit makes my benchmark 1x slower than the benchmark without the limit. Below is an example

Re: [R-pkg-devel] CRAN no longer checking for solaris?

2021-12-06 Thread J C Nash
I'd second Uwe's point. I was one of 31 signatories to first IEEE 754 (I didn't participate in the two more recent releases, as I already tore my hair out with the details of low level bit manipulations). Before the standard, porting code was truly a nightmare. We did it because we had to and

[Rd] install.packages() and Additional_repositories

2021-12-06 Thread Thierry Onkelinx via R-devel
Dear R core team, Writing R extensions mentions an optional 'Additional_repositories' field in the DESCRIPTION. ( https://cran.r-project.org/doc/manuals/R-exts.html#Package-Dependencies). Currently, install.packages() does not use that information when installing a package. Would you accept a

[R-pkg-devel] CRAN winter break Dec 21 to Jan 3

2021-12-06 Thread Uwe Ligges
Dear package developers, CRAN will close its incoming submission queue on Dec 21 and will open it again on Jan 3. Best, Uwe Ligges __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel

Re: [R-pkg-devel] CRAN no longer checking for solaris?

2021-12-06 Thread Uwe Ligges
On 06.12.2021 03:09, Avraham Adler wrote: Would this mean we could start using little endian bit strings, as I think only the Solaris platform was big endian (or was it the other way around)? It depends on the hardware, not the OS. CRAN checked on Intel CPUs, which are little endian while

Re: [Rd] string concatenation operator (revisited)

2021-12-06 Thread Duncan Murdoch
On 06/12/2021 1:14 a.m., Radford Neal wrote: The TL;DR version is base R support for a `+.character` method. This would essentially provide a shortcut to `paste0`... In pqR (see pqR-project.org), I have implemented ! and !! as binary string concatenation operators, equivalent to paste0 and