The operator %p% combines character vectors.

x %p% y

Arguments

x, y

R objects that can be converted to character vectors.

Value

A character vector of the concatenated values.

Details

The call x %p% y is equivalent to the call paste0(x,y); see paste for more details.

Examples

# Combine strings via operator
"Hello" %p% " " %p% "world"
#> [1] "Hello world"

# Vectorized
x <- "I like "
y <- c("cats", "dogs", "fish")
x %p% y
#> [1] "I like cats" "I like dogs" "I like fish"