squarematrix {miscset} | R Documentation |
Create a Square Matrix
Description
Transform any m x n matrix to a square matrix by column/row names. Stops if no or duplicated dimnames are provided in x.
Usage
squarematrix(x)
Arguments
x |
Object of class |
Value
Returns a matrix
.
Author(s)
Sven E. Templer
Examples
#
m <- matrix(1:6, 2, dimnames=list(2:3,1:3))
m
squarematrix(m)
#
[Package miscset version 1.1.0 Index]