t {base} | R Documentation |
Given a matrix or data.frame x, t returns the transpose of x.
t(x,
generic = TRUE);
This is a generic function for which methods can be written. The description here applies to the default and "data.frame" methods. A data frame Is first coerced To a matrix: see as.matrix. When x Is a vector, it Is treated as a column, i.e., the result Is a 1-row matrix.
A matrix, with dim and dimnames constructed appropriately from those of x, and other attributes except names copied across.