rray_flip: Flip an rray along a dimension

Description Usage Arguments Details Value Examples

View source: R/flip.R

Description

rray_flip() reverses the elements of an rray along a single dimension.

Usage

1

Arguments

x

An rray.

axis

An integer of size 1 specifying the dimension to flip.

Details

Dimension names are flipped as well.

Value

x but with reversed elements along axis.

Examples

1
2
3
4
5
6
7
x <- rray(1:10, c(5, 2))
x <- rray_set_row_names(x, letters[1:5])
x <- rray_set_col_names(x, c("c1", "c2"))

rray_flip(x, 1)

rray_flip(x, 2)

DavisVaughan/rray documentation built on Feb. 5, 2020, 10:06 p.m.