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
print(data.frame(COL1=1:5, COL2=10:6), row.names=FALSE) On 27/03/2023 1:05 p.m., Dennis Fisher wrote:> 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 > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
@vi@e@gross m@iii@g oii gm@ii@com
2023-Mar-27 17:31 UTC
[R] printing a data.frame without row numbers
Try: print(data.frame(COL1=1:5, COL2=10:6), row.names=FALSE) -----Original Message----- From: R-help <r-help-bounces at r-project.org> On Behalf Of Dennis Fisher Sent: Monday, March 27, 2023 1:05 PM To: r-help at r-project.org Subject: [R] printing a data.frame without row numbers 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 ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.
Read ?print.data.frame. There is an argument for that. On March 27, 2023 10:05:10 AM PDT, Dennis Fisher <fisher at plessthan.com> wrote:>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 > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.-- Sent from my phone. Please excuse my brevity.