Working with Matrices

Using the ROWNAME= and COLNAME= Options

You can specify your own row and column headings. The easiest way is to create vectors containing the headings and then display the matrix with the ROWNAME= and COLNAME= options. For example, the following statements produce the subsequent matrix:

  
    > names={jenny linda jim samuel}; 
    > days={mon tue wed thu fri}; 
    > print coffee[rowname=names colname=days]; 
  
       COFFEE       MON       TUE       WED       THU       FRI 
  
       JENNY          4         2         2         3         2 
       LINDA          3         3         1         2         1 
       JIM            2         1         0         2         1 
       SAMUEL         5         4         4         3         4
 

Previous Page | Next Page | Top of Page