[R] Is it possible to print a data.frame without the row names?

From: Bos, Roger <roger.bos_at_us.rothschild.com>
Date: Thu, 24 May 2007 10:17:29 -0400


Is it possible to print a data.frame without the row names? I checked ?data.frame, ?print, ?format and didn't see anything that helped. In the example below, I would just like to show the two columns of data and not the row.names 1:10.  

> a<-data.frame(1:10, 21:30)
> a

   X1.10 X21.30

1      1     21
2      2     22
3      3     23
4      4     24
5      5     25
6      6     26
7      7     27
8      8     28
9      9     29
10    10     30

> row.names(a)<-NULL
> a

   X1.10 X21.30

1      1     21
2      2     22
3      3     23
4      4     24
5      5     25
6      6     26
7      7     27
8      8     28
9      9     29
10    10     30

>
 

Thanks,  

Roger J. Bos, CFA     


R-help_at_stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 24 May 2007 - 14:23:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 24 May 2007 - 16:31:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.