x' or t(x), where x is a matrix |

x' (x followed by a single quote or "prime") computes the transpose of x if x is a matrix, that is the matrix y with y[i,j] = x[j,i]. When x is a vector of length n, x' is a 1 by n matrix, that is, a row vector. When x is an array with dimensions n1, n2, ..., nk, y <- x' computes an array y with dimensions nk, ..., n1 such that y[i1,...,ik] is x[ik,...,i1]. When x is a generalized matrix (see 'matrices'), so is x', and matrix(x)' = matrix(x'). t(x) is synonymous with x'. Provided ndims(x) > 1, t(x,run(ndims(x),1)) is equivalent to t(x) and x'. See also t(). Instead of x' %*% y and x %*% y' you can use x %c% y and x %C% y, respectively which use less internal memory. See topic 'matrices' for more information on these matrix multiplication operators. When x is a structure, each of whose components is REAL, LOGICAL, or CHARACTER, x' computes a structure with the same shape and with the same component names as x whose non-structure components are the transposes of the corresponding components of x. See also topics array(), 'matrices', 'subscripts'.

Gary Oehlert 2003-01-15