Learn R Programming

BBmisc (version 1.10)

collapse: 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

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

Run the code above in your browser using DataLab