[R] printing a data.frame without row numbers

Dennis Fisher ||@her @end|ng |rom p|e@@th@n@com
Mon Mar 27 19:05:10 CEST 2023


R 4.2.3
OS X

Colleagues,

I am printing a large number of tables using the print command.  A simple example is:
	print(data.frame(COL1=1:5, COL2=10:6))

The result in this case is:
  COL1 COL2
1    1   10
2    2    9
3    3    8
4    4    7
5    5    6

I would like to print the table WITHOUT the row numbers:
 COL1 COL2
    1   10
    2    9
    3    8
    4    7
    5    6

Is there any simple way to accomplish this, short of writing my own print method or outputting line-by-line using cat?

Dennis

Dennis Fisher MD
P < (The "P Less Than" Company)
Phone / Fax: 1-866-PLessThan (1-866-753-7784)
www.PLessThan.com



More information about the R-help mailing list