Learn R Programming

BBmisc (version 1.13)

collapse: Collapse vector to string.

Description

A simple wrapper for paste(x, collapse).

Usage

collapse(x, sep = ",")

Value

[character(1)].

Arguments

x

[vector]
Vector to collapse.

sep

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

Examples

Run this code
collapse(c("foo", "bar"))
collapse(c("foo", "bar"), sep = ";")

Run the code above in your browser using DataLab