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

From: Bert Gunter <gunter.berton_at_gene.com>
Date: Thu, 24 May 2007 08:44:04 -0700


?write.table

Bert Gunter
Genentech Nonclinical Statistics

-----Original Message-----
From: r-help-bounces_at_stat.math.ethz.ch
[mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of Bos, Roger Sent: Thursday, May 24, 2007 7:17 AM
To: r-help_at_stat.math.ethz.ch
Subject: [R] Is it possible to print a data.frame without the row names?

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.

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 - 15:48:41 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 - 17:31:05 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.