dots_char: Convert dots (...) to a character vector or a string

View source: R/r_tools.R

dots_charR Documentation

Convert dots (...) to a character vector or a string

Description

Convert dots (...) to a character vector or a string

Usage

dots_char(..., collapse = NULL)

Arguments

...

(Dots) Elements in dots.

collapse

(Character or NULL) The elements of ... will be pasted together with this string between them.

Value

A character vector. If collapse = NULL, returns each separate item in ... as a separate element of a character vector. If collapse = "-", for example, returns a single string where all items in ... are joined together with -.

Examples

dots_char(return, this, as, a, vector)

#> [1] "return" "this" "as" "a" "vector" 

dots_char(return, this, as, a, single, string, collapse = "_")

#> [1] "return_this_as_a_single_string"


DesiQuintans/desiderata documentation built on April 9, 2023, 5:43 a.m.