Learn R Programming

stringr (version 1.3.1)

str_flatten: Flatten a string

Description

Flatten a string

Usage

str_flatten(string, collapse = "")

Arguments

string

Character to flatten

collapse

String to insert between each piece

Value

A character vector of length 1

Examples

Run this code
# NOT RUN {
str_flatten(letters)
str_flatten(letters, "-")
# }

Run the code above in your browser using DataLab