Learn R Programming

Xmisc (version 0.2.1)

vconcat: Concatenate vector into a string

Description

Concatenate vector into a string

Usage

vconcat(x, sep = ", ", capsule = FALSE, quote = FALSE)

Arguments

x
vector
sep
character, a delimiter
capsule
logical, weather to capsule with `c()'
quote
logical, weather to surround elements by double quotes.

Value

vector

Examples

Run this code
cat(vconcat(head(letters),capsule=TRUE,quote=TRUE),'\n')
## c("a", "b", "c", "d", "e", "f")

cat(vconcat(head(letters),sep='-'),'\n')
## a-b-c-d-e-f

Run the code above in your browser using DataLab