combo_paste: Paste all combinations of elements of a set of character...

Description Usage Arguments Value Examples

View source: R/combo_paste.R

Description

A wrapper for apply(expand.grid())

Usage

1
combo_paste(a, b, ..., sep = "")

Arguments

a

(character) vector 1, left-hand side of output

b

(character) vector 2, right-hand side of output

...

optional, additional arguments to expand.grid (e.g., character vectors to combine)

sep

(character) separates the results

Value

A character vector.

Examples

1
2
combo_paste(letters[1:2], letters[3:4], sep = "_")
combo_paste(letters[1:2], letters[3:4], LETTERS[24:26], sep = "_")  ## accommodates >2 vectors

mcfreund/mfutils documentation built on Feb. 6, 2022, 4:57 a.m.