Skip to contents

Syntactic sugar for common string pasting operations.

Usage

x %_% y

x %+% y

x %.% y

x %-% y

Arguments

x

character vector

y

character vector

Value

x concatenated with y

Details

%+%

Paste with a blank separator, like python string concatenation

%_%

Paste with underscore separator

%.%

Paste with dot separator – useful for adding file extensions

%-%

Paste with dash separator – useful for representing contiguous numbers

Examples

'google' %.% 'com'
#> [1] "google.com"
'snake' %_% 'case'
#> [1] "snake_case"