tab <- matrix( c( 1, 11, 111,
2, 22, 222,
3, 33, 333), byrow=TRUE, nrow=3)
Rev(tab, margin=1)
Rev(tab, margin=2)
# reverse both dimensions
Rev(tab, margin=c(1,2))
Run the code above in your browser using DataLab