Learn R Programming

tropAlgebra (version 0.1.1)

transpose: Transpose of a Matrix

Description

This fucntion interchage the rows into columns or columns into rows.

Usage

transpose(X)

Arguments

X

A Matrix.

Value

Returns transposed matrix X.

Details

If the given argument is not a matrix this function generates an error, otherwise, it tronsposed the matrix and returns in the same variable that was passed in argument like pass by reference. It changes values in memory.

Examples

Run this code
# NOT RUN {
X<-matrix(c(2,5,3,7),ncol=2,nrow=2)
transpose(X)

# }

Run the code above in your browser using DataLab