Learn R Programming

salad (version 1.2)

t: Transposition of matrices and arrays

Description

Transposition of matrices and arrays

Usage

# S3 method for dual
t(x)

# S3 method for dual aperm(a, perm = NULL, resize = TRUE, ...)

Value

A dual matrix or array.

Arguments

x, a

a dual matrix or array

perm

subscript permutation vector

resize

if 'TRUE' (default) the array is reshaped

...

extra arguments (ignored)

Examples

Run this code
x <- dual( matrix(c(1,2,0,3), 2, 2) )
t(x)

# creation of an array using dim<-
y <- dual( c(1,-1) ) + 1:12
dim(y) <- c(2,3,2)
z <- aperm(y, c(2,3,1))
z
d(z, "x1")

Run the code above in your browser using DataLab