b01-1-matrix-utility: OOMPA Matrix Utility Functions

Description Usage Arguments Value Author(s) Examples

Description

Utility functions for manipulating matrices.

Usage

1
2
flipud(x)
fliplr(x)

Arguments

x

a matrix

Value

The flipud function returns a matrix the same size as x, with the order of the rows reversed, so the matrix has been flipped vertically. The fliplr function returns a matrix the same size as x but flipped horizontally, with the order of the columns reversed.

Author(s)

Kevin R. Coombes krc@silicovore.com

Examples

1
2
3
4
mat <- matrix(1:6, 2, 3)
mat
flipud(mat)
fliplr(mat)

Example output

Loading required package: oompaBase
     [,1] [,2] [,3]
[1,]    1    3    5
[2,]    2    4    6
     [,1] [,2] [,3]
[1,]    2    4    6
[2,]    1    3    5
     [,1] [,2] [,3]
[1,]    5    3    1
[2,]    6    4    2

PreProcess documentation built on May 6, 2019, 5:02 p.m.