collapse_slash: Collapse a character vector to a slash-delimited string.

Description Usage Arguments Value Examples

View source: R/collapse.R

Description

Collapse a character vector to a slash-delimited string.

Usage

1
collapse_slash(vector, forward = TRUE, terminal_slash = TRUE)

Arguments

vector

The character vector to collapse (2 or more elements).

forward

Logical indicating whether a forward slash (TRUE) should be used or a doubled-backslash (FALSE)

terminal_slash

Logical indicating whether the string should be terminated by a slash.

Value

A single element character vector containing all the elements of vector separated by slashes.

Examples

1
2
3
4
collapse_slash(c("www.github.com", "seaaan", "easieR"))
collapse_slash(c("~", "Documents", "Important",
   "passwords-in-plain-text.txt"), terminal_slash = FALSE)
collapse_slash(c("backslashes", "are", "doubled"), forward = FALSE)

seaaan/easieR documentation built on May 26, 2017, 4:44 a.m.