Re: [R] How to export data to Excel Spreadsheet?

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Wed 09 Aug 2006 - 00:18:15 EST

Hi

On 7 Aug 2006 at 8:00, Berton Gunter wrote:

From:           	Berton Gunter <gunter.berton@gene.com>
To:             	"'Paul Smith'" <phhs80@gmail.com>,
	"'R-Help'" <R-help@stat.math.ethz.ch>
Date sent:      	Mon, 7 Aug 2006 08:00:00 -0700
Organization:   	Genentech Inc.
Subject:        	Re: [R] How to export data to Excel Spreadsheet?

> You can also usually copy and paste to/from the Windows clipboard by
> using file='clipboard' in file i/o or via description = 'clipboard'
> using connections. I haven't checked all details of this, so there may
> be some glitches.

No problem

write.excel<-function(tab, ...) write.table( tab, "clipboard", sep="\t", row.names=F)

works, at least with my version of Excel. Of course after Ctrl-Ving in Excel

HTH
Petr

>
> -- Bert Gunter
>
> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch
> [mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Paul Smith
> Sent: Monday, August 07, 2006 5:23 AM To: R-Help Subject: Re: [R] How
> to export data to Excel Spreadsheet?
>
> On 8/7/06, Xin <jasonshi510@hotmail.com> wrote:
> > I try to export my output's data to Excel spreadsheet. My outputs
> > are:
> >
> > >comb3
> > [,1] [,2] [,3]
> > [1,] "a" "b" "c"
> > [2,] "a" "b" "d"
> > [3,] "a" "b" "e"
> > [4,] "a" "b" "f"
> > [5,] "a" "b" "g"
>
> See
>
> ? write.table
> ? write.csv
>
> Paul
>
> ______________________________________________
> R-help@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@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.

Petr Pikal
petr.pikal@precheza.cz



R-help@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 Wed Aug 09 00:22:36 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 09 Aug 2006 - 02:17:23 EST.

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