op-star-rep {toscmask}R Documentation

Star operator

Description

Behaves like normal * except if one operand is numeric and the other operand is of type character. In that case, each element of the character vector is replicated and the replicates are pasted together.

Usage

x * y

Arguments

x, y

numeric or complex vectors or objects which can be coerced to such, or other objects for which methods have been written, or a combination of numeric and character vectors.

Value

Same as *, except if one operand is numeric and the other operand is of type character. In that case, each element of the character vector is replicated, the replicates are pasted together and the result is returned.

Examples

"a" * 3
c("a", "b") * 3
3 * "a"
3 * c("a", "b")

[Package toscmask version 1.2.3 Index]