Learn R Programming

polyMatrix (version 0.2.5)

t: Matrix transpose of a 'polyMatrix' class object

Description

Given a polyMatrix class x, the call t(x) returns the transpose of x.

Usage

# S3 method for polyMatrix
t(x, ...)

Arguments

x

an polyMatrix class object

...

not used

Value

A 'polyMdlist, polyMatrix' class object, the transposed version of the given x polynomial matrix.

Details

The method first convert the storage method of the given polyMatrix object to polyMdlist class interpretation, then flips the polyMatrix over its diagonal.

See Also

The ‘t’ in the base package.

Examples

Run this code
# NOT RUN {
# ---
# case of real matrix argument

m <- matrix(1:12,3,4)
m
t(m) # the \code{base::t()} function

# ---
# case of polynomial matrix argument

pa <- polyMgen.a()
pa
dim(pa) # 2 x 3

pm <- t(pa)
pm
dim(pm) # 3 x 2
class(pm) #  "polyMdlist" "polyMatrix"

# clean up
# rm(m,pd)
# }

Run the code above in your browser using DataLab