# NOT RUN {
r <- rast(nrow=18, ncol=36)
m <- matrix(1:ncell(r), nrow=18)
values(r) <- as.vector(t(m))
rx <- flip(r, direction="h")
values(r) <- as.vector(m)
ry <- flip(r, direction="v")
v <- rev(r)
# }
Run the code above in your browser using DataLab