
Last chance! 50% off unlimited learning
Sale ends in
Paste and combine
paste_c(x, y, collate = TRUE, sep = "")paste_combine(..., collate = TRUE, sep = "")
collapse0(..., sep = "")
A character
vector
Vectors to paste and/or combine
Logical; TRUE
prints out combinations in order of the first
vector elements then the next; otherwise reversed (see examples)
A character string to separate terms
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 = "_")
Run the code above in your browser using DataLab