grapes-plus-grapes: %+%

%+%R Documentation

%+%

Description

String-concatenation infix operator a la '+' in Python.

Usage

lhs %+% rhs

Arguments

lhs

String (or string-coercible object) to be concatenated with the rhs (right-hand side).

rhs

String (or string-coercible object) to be concatenated with the lhs (left-hand side).

Details

No dependencies.

Value

A character vector with length equal to the maximum length of the inputs.

Examples

## Not run: 
'aaa ' %+% 'bbb ' %+% 'ccc ' %+% 'ddd'
# Zero-length inputs are concatenated in the resulting string as ''
'aaa ' %+% 'bbb ' %+% 'ccc ' %+% 'ddd'[F]
# If an input has length > 1, the result has length > 1 and a warning is given
c('aaa ', 'bbb ') %+% 'zzz'

## End(Not run)


jacob-gg/manager documentation built on July 2, 2024, 2:09 a.m.