31_replication_functions: Replication Functions

Description Usage Arguments Value Examples

Description

rep methods, and rep2 methods, functions similar to rep_len.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## S3 method for class 'ObjectArray'
rep(x, n=1, ..., each=1, times=n)
## S3 method for class 'ImageArray'
rep(x, n=1, ..., each=1, times=n)
## S3 method for class 'GeomArray'
rep(x, n=1, ..., each=1, times=n)
## S3 method for class 'MatrixArray'
rep(x, n=1, ..., each=1, times=n)

## S3 method for class 'ObjectArray'
rep2(v, n, ..., n.out=n)
## S3 method for class 'GeomArray'
rep2(v, n, ..., n.out=n)
## S3 method for class 'ImageArray'
rep2(v, n, ..., n.out=n)
## S3 method for class 'MatrixArray'
rep2(v, n, ..., n.out=n)

Arguments

x, v

A one-dimensional ObjectArray (incl subclasses).

n

Default value for n.out and times, see below.

each

Integer, the number of times, each element is repeated, consecutively.

times

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

n.out

Integer, the length of the output object.

...

Ignored.

Value

A new one-dimensional ImageArray, ObjectArray, GeomArray or MatrixArray object.

Examples

1
rep (eq.brot2 (4), 10)

vectools documentation built on June 7, 2021, 9:08 a.m.