collapse {BBmisc}R Documentation

Collapse vector to string.

Description

A simple wrapper for paste(x, collapse).

Usage

collapse(x, sep = ",")

Arguments

x

[vector]
Vector to collapse.

sep

[character(1)]
Passed to collapse in paste. Default is “,”.

Value

[character(1)].

Examples

collapse(c("foo", "bar"))
## [1] "foo,bar"
collapse(c("foo", "bar"), sep = ";")
## [1] "foo;bar"

[Package BBmisc version 1.7 Index]