%s+% | R Documentation |
Binary operators for joining (concatenating) two character vectors, with a typical R look-and-feel.
e1 %s+% e2
e1 %stri+% e2
e1 |
a character vector or an object coercible to a character vector |
e2 |
a character vector or an object coercible to a character vector |
Vectorized over e1
and e2
.
These operators act like a call to stri_join(e1, e2, sep='')
.
However, note that joining 3 vectors, e.g., e1 %s+% e2 %s+% e3
is slower than stri_join(e1, e2, e3, sep='')
,
because it creates a new (temporary) result vector each time
the operator is applied.
Returns a character vector.
Marek Gagolewski and other contributors
The official online manual of stringi at https://stringi.gagolewski.com/
Gagolewski M., stringi: Fast and portable character string processing in R, Journal of Statistical Software 103(2), 2022, 1-59, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v103.i02")}
Other join:
stri_dup()
,
stri_flatten()
,
stri_join_list()
,
stri_join()
c('abc', '123', 'xy') %s+% letters[1:6]
'ID_' %s+% 1:5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.