utils-paste: Paste combine

utils-pasteR Documentation

Paste combine

Description

Paste and combine

Usage

paste_c(x, y, collate = TRUE, sep = "")

paste_combine(..., collate = TRUE, sep = "")

collapse0(..., sep = "")

Arguments

x, y, ...

Vectors to paste and/or combine

collate

Logical; TRUE prints out combinations in order of the first vector elements then the next; otherwise reversed (see examples)

sep

A character string to separate terms

Value

A character vector

Examples

x <- letters[1:5]
y <- 1:3
z <- month.abb[c(1, 12)]
paste_combine(x, y)
paste_combine(x, y, z)
paste_combine(x, y, z, sep = ".")
paste_combine(x, y, sep = "_")
paste_combine(x, y, collate = FALSE)
collapse0(list(1:3, letters[1:3]), 5:7, letters[5:7])
collapse0(1:3, letters[5:7], sep = "_")

mark documentation built on May 29, 2024, 5:13 a.m.