[R] How to export data to Excel Spreadsheet?

Petr Pikal petr.pikal at precheza.cz
Tue Aug 8 16:18:15 CEST 2006


Hi

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

From:           	Berton Gunter <gunter.berton at gene.com>
To:             	"'Paul Smith'" <phhs80 at gmail.com>,
	"'R-Help'" <R-help at 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 at stat.math.ethz.ch
> [mailto:r-help-bounces at 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 at 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 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.

Petr Pikal
petr.pikal at precheza.cz



More information about the R-help mailing list