Re: [R] Suppressing observation numbers

From: Rolf Turner <>
Date: Thu 03 Mar 2005 - 09:30:21 EST

Nam-Ky Nguyen wrote:

> Below is a part of the R output. Please consider the two lines:
> > data
> > model.matrix(m1)
> Is there a way of suppressing the observation numbers 1, 2, ...27 in the
> output (I don't want these number to appear in the output)?

The (``relatively low level''?) function prmatrix() allows you to do what you want:

        > prmatrix(model.matrix(m1),rowlab=rep("",27))

I have in the past suggested to the R Core Team that an argument be added to print.matrix() and to permit the suppression of the printing of row names. Something like ``print.row.names=TRUE''. This would be easy to accomplish, since print.matrix() and simply call upon prmatrix(). However my suggestion has so far fallen upon deaf ears.


					Rolf Turner

______________________________________________ mailing list PLEASE do read the posting guide! Received on Thu Mar 03 09:58:41 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:39 EST