Learn R Programming

bazar (version 1.0.11)

concat: String concatenation

Description

The function concat concatenates character vectors all together.

concat0(.) is a wrapper for concat(., sep = ""). concat_(.) is a wrapper for concat(., sep = "_").

Usage

concat(..., sep = " ", na.rm = TRUE)

concat0(..., na.rm = TRUE)

concat_(..., na.rm = TRUE)

Arguments

...

One or more objects, to be converted to character vectors and concatenated.

sep

character. The character to use to separate the result.

na.rm

logical. If TRUE (the default), missing values are removed before concatenation.

Value

Always a character value (vector of length 1).

See Also

paste.

Examples

Run this code
# NOT RUN {
v <- c("Florence", "Julie", "Angela")
concat0(v)
concat_(v)
concat(v, sep = "^^")
concat0(c("a", "b"), c(1, NA, 3), NA)
concat(c(NA, NA))
concat(c(NA, NA), na.rm = FALSE) # usually not desirable

# }

Run the code above in your browser using DataLab