Learn R Programming

vectools (version 0.2.0)

21_combine_and_replication_functions: Replication Functions

Description

A combine and rep method for MatrixArray and a function similar to rep_len.

Usage

# S3 method for MatrixArray
c(x, …)

# S3 method for MatrixArray rep(x, n=1, …, each=1, times=n) # S3 method for MatrixArray rep2(x, n, …, n.out=n)

Arguments

x

A 1d MatrixArray object.

In the combine function, further MatrixArray objects. In other functions, ignored.

n

Refer to the each and n.out arguments.

each

The number of times, each element is repeated, consecutively.

times

The number of times, the sequence is repeated, periodically.

n.out

The length of the output object.

Value

A new MatrixArray object.

Examples

Run this code
# NOT RUN {
rep (eq.brot2 (4), 10)
# }

Run the code above in your browser using DataLab