rotate {PET} | R Documentation |
The function implements the rotation of a vector, a matrix or a 3-dimensional array.
rotate(A, grad = 90)
A |
Is a vector, a matrix or a 3-dimensional array. |
grad |
Can be set to 0, 90, 180, 270, -90, -180 or -270. Defaults to |
Returns the rotated data.
Joern Schulz, jschulz78@web.de.
# Rotation of a vector (x <- c(1:5)) rotate(x,270) rm(x) # Rotation of a matrix (A <- matrix(1:15, nrow=3)) rotate(A, -90) rm(A) # Rotation of an array (A <- array(1:20, c(2,5,2))) rotate(A, 180) rm(A)