specifies the name of a character matrix whose first nrow
elements are to be used for the row labels of the matrix to be
printed, where nrow is the number of rows in the matrix
and where the scan to find the first nrow elements goes
across row 1, then across row 2, and so forth through row n.
(You can also use the RESET autoname statement to
automatically label rows as ROW1, ROW2, and so on.)
reset autoname;
For example, you can use the statement below to print a
matrix called X in format 12.2 with columns labeled
AMOUNT and NET PAY, and rows labeled DIV A and DIV B:
x={45.125 50.500,
75.375 90.825};
r={"DIV A" "DIV B"};
c={"AMOUNT" "NET PAY"};
print x[rowname=r colname=c format=12.2];
The output is
X AMOUNT NET PAY
DIV A 45.13 50.50
DIV B 75.38 90.83
To permanently associate the above options with a matrix
name, refer to the description of the MATTRIB statement.
If there is not enough room to print all the matrices across the
page, then one or more matrices are printed out in the next group.
If there is not enough room to print all the columns of
a matrix across the page, then the columns are folded,
with the continuation lines identified by a colon(:).
The spacing between adjacent matrices can be controlled
by the SPACES= option of the RESET statement.
The FW= option of the RESET statement can be used to control the
number of print positions used to print each numeric element.
For more print-related options, see
the description of the RESET statement.
The example below shows how to print part of a matrix:
y=1:10;
/* prints first five elements of y*/
print (y[1:5]) [format=5.1];