Skip to contents

stm_fliplr() flips a matrix left to right, i.e., it reverses the order of columns. This is achieved by calling the stm_flip() function with left_right = TRUE.

Usage

stm_fliplr(mat)

Arguments

mat

A numeric matrix to be flipped left to right.

Value

A matrix that is flipped left to right.

Details

This function uses the stm_flip() function with the argument left_right = TRUE to flip the matrix horizontally.

See also

Examples

A <- matrix(1:12, 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
stm_fliplr(A)
#>      [,1] [,2] [,3] [,4]
#> [1,]    4    3    2    1
#> [2,]    8    7    6    5
#> [3,]   12   11   10    9