Learn R Programming

PreProcess (version 3.1.9)

matrix.utility: OOMPA Matrix Utility Functions

Description

Utility functions for manipulating matrices.

Usage

flipud(x)
fliplr(x)

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.

Arguments

x

a matrix

Author

Kevin R. Coombes krc@silicovore.com

Examples

Run this code
mat <- matrix(1:6, 2, 3)
mat
flipud(mat)
fliplr(mat)

Run the code above in your browser using DataLab