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()
ther
>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 was
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)
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
iden
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
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 character?
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 Be
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 "NA")
> > 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"
>
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
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 patc
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 past
12 matches
Mail list logo