flip.vert: Flip matrix vertically

Description Usage Arguments Details Value Examples

View source: R/primitive.matrix.functions.R

Description

Flip given matrix on a horizontal axis, thus returning it upside down.

Usage

1

Arguments

x

a 2d-matrix

Details

apply(x,2,rev)

Value

the given matrix flipped upside down

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
a<-matrix(1:9,3,3)
a
#     [,1] [,2] [,3]
#[1,]    1    4    7
#[2,]    2    5    8
#[3,]    3    6    9
flip.vert(a)
#     [,1] [,2] [,3]
#[1,]    3    6    9
#[2,]    2    5    8
#[3,]    1    4    7

nobodyinperson/matrixutils documentation built on May 23, 2019, 9:31 p.m.