transpose: Vector and Matrix Transpose

Description Usage Arguments Value Author(s) See Also Examples

View source: R/transpose.R

Description

transpose is a wrapper function around the t function, which tranposes matrices. Contrary to t, transpose processes vectors as if they were row matrices.

Usage

1
  transpose(object = NULL)

Arguments

object

A vector or a matrix.

Value

Return a matrix which is the exact transpose of the vector or matrix x

Author(s)

Sebastien Bihorel (sb.pmlab@gmail.com)

See Also

t

Examples

1
2
3
4
5
6
  1:6
  t(1:6)
  transpose(1:6)
  mat <- matrix(1:15,nrow=5,ncol=3)
  mat
  transpose(mat)

sbihorel/optimbase documentation built on Jan. 31, 2022, 1:34 a.m.