Skip to contents

stm_flipud() flips a matrix upside down, i.e., it reverses the order of rows. This is achieved by calling the stm_flip() function with left_right = FALSE.

Usage

stm_flipud(mat)

Arguments

mat

A numeric matrix to be flipped upside down.

Value

A matrix that is flipped upside down.

Details

This function uses the stm_flip() function with the argument left_right = FALSE to flip the matrix vertically.

See also

Examples

A <- matrix(1:16, ncol = 4, byrow = TRUE)
print(A)
#>      [,1] [,2] [,3] [,4]
#> [1,]    1    2    3    4
#> [2,]    5    6    7    8
#> [3,]    9   10   11   12
#> [4,]   13   14   15   16
stm_flipud(A)
#>      [,1] [,2] [,3] [,4]
#> [1,]   13   14   15   16
#> [2,]    9   10   11   12
#> [3,]    5    6    7    8
#> [4,]    1    2    3    4