Learn R Programming

magic (version 1.3-20)

arot: Rotates an array about two specified dimensions

Description

Rotates an array about two specified dimensions by any number of 90 degree turns

Usage

arot(a, rights = 1,pair=1:2)

Arguments

a
The array to be rotated
rights
Integer; number of right angles to turn
pair
A two-element vector containing the dimensions to rotate with default meaning to rotate about the first two dimensions

See Also

arev

Examples

Run this code
a <- array(1:16,rep(2,4))
arot(a)
arot(a,c(1,3))

Run the code above in your browser using DataLab