Learn R Programming

broadcast (version 0.1.7)

bc_strrep: Broadcasted strrep

Description

The bc_strrep() method is a broadcasted form of strrep.

Usage

bc_strrep(x, y, ...)

# S4 method for ANY bc_strrep(x, y)

Value

A character array as a result of the broadcasted repetition operation.


Arguments

x

vector/array of type character.

y

vector/array of type integer.

...

further arguments passed to or from methods.

Examples

Run this code

x <- array(sample(month.abb), c(10, 2))
y <- array(sample(1:10), c(10, 2, 3))

print(x)
print(y)

bc_strrep(x, y)

Run the code above in your browser using DataLab