Learn R Programming

fifer (version 1.1)

intersperse: Intersperse elements of Two+ Vectors

Description

Intersperse elements of two+ vectors Given two vectors (one of length i, the other of length j), intersperse will combine the elements of each vector into strings of length i X j, where each element is the concatenation of the elements of the two vectors. See examples.

Usage

intersperse(...)

Arguments

...
the vectors the user wishes to intersperse

Value

a vector of length i X j, containing the interspersed vectors as strings

Examples

Run this code
intersperse(LETTERS[1:3], 1:3)

Run the code above in your browser using DataLab