Skip to contents

A wrapper on base::paste().

Usage

p(..., sep = " ", collapse = NULL)

p0(..., collapse = NULL)

Arguments

...

one or more R objects, to be converted to character vectors.

sep

a character string to separate the terms. Not NA_character_.

collapse

an optional character string to separate the results. Not NA_character_. When collapse is a string, the result is always a string (character of length 1).

Value

A character vector.

Functions

Examples

p("a", "b")
#> [1] "a b"
p(c("a", "b"), collapse = " ")
#> [1] "a b"
p0("a", "b")
#> [1] "ab"
p0(c("a", "b"), collapse = "")
#> [1] "ab"