rray_tile: Tile an array

Description Usage Arguments Details Value Examples

View source: R/tile.R

Description

Tile an array

Usage

1
rray_tile(x, times)

Arguments

x

A vector, matrix, array or rray.

times

An integer vector. The number of times to repeat the array along an axis.

Details

rray_tile() should not be used as a replacement for rray_broadcast(), as it is generally less efficient.

Value

x with dimensions repeated as described by times.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
x <- matrix(1:5)

# Repeat the rows twice
rray_tile(x, 2)

# Repeat the rows twice and the columns three times
rray_tile(x, c(2, 3))

# Tile into a third dimension
rray_tile(x, c(1, 2, 2))

rray documentation built on July 23, 2019, 5:04 p.m.