powered by
rray_flip() reverses the elements of an rray along a single dimension.
rray_flip()
rray_flip(x, axis)
An rray.
An integer of size 1 specifying the dimension to flip.
1
x but with reversed elements along axis.
x
axis
Dimension names are flipped as well.
# NOT RUN { 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) # }
Run the code above in your browser using DataLab