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

Bert Gunter gunter.berton at gene.com
Thu May 24 17:44:04 CEST 2007


?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
  
 

********************************************************************** * 
This message is for the named person's use only. It may 
contain confidential, proprietary or legally privileged 
information. No right to confidential or privileged treatment 
of this message is waived or lost by any error in 
transmission. If you have received this message in error, 
please immediately notify the sender by e-mail, 
delete the message and all copies from your system and destroy 
any hard copies. You must not, directly or indirectly, use, 
disclose, distribute, print or copy any part of this message 
if you are not the intended recipient. 
**********************************************************************
	[[alternative HTML version deleted]]

______________________________________________
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.



More information about the R-help mailing list