pmat {lazy.mat} | R Documentation |
Generate a permutation matrix to switch row or column.
Description
Generate a permutation matrix to switch row or column.
Usage
pmat(n, i, j)
Arguments
n |
the size of matrix |
i |
column number |
j |
column number |
Details
Can be used with a character matrix.
Value
The permutation matrix of size n
Examples
pmat(3,2,1)
A=demomat(3,2)
A%*%pmat(2,2,1)
pmat(3,2,1)%*%A
[Package lazy.mat version 0.1.6 ]