[R] customize output in Excel and creating reports in word.
Greg.Snow at imail.org
Mon Jul 18 23:06:08 CEST 2011
There are several options depending on what exactly you want to do.
If you use code like:
> write.table(x, 'clipboard', sep='\t')
In R, then go to excel and choose a cell and paste to it, the matrix or data frame 'x' will be pasted into excel at that point (topleft corner of data goes in selected cell). You might want to change some of the other arguments to write.table.
You can look at the Rexcel project which will allow you to call R from within excel and put the results into excel.
There are some packages that have functions for writing excel spreadsheets that may work for you.
For putting output in R you could use the R2wd package to place specific tables and graphs into a word document or wdtxtStart and friends from the TeachingDemos package (which just automate calls to R2wd) to copy all your commands and output to a word document.
If you have specific things that you want in a document that will be the same each time, just with different data then you should consider the sweave approach using either the odfWeave package or sword (part of the Rexcel project).
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of ATANU
> Sent: Friday, July 15, 2011 11:49 PM
> To: r-help at r-project.org
> Subject: [R] customize output in Excel and creating reports in word.
> can any one help me in customizing output(inserting 2 or more tables in
> single sheet,creating table title etc.) in excel? I also need to know
> whether it is possible to create a page with charts and graphs in word
> R? thanks in advance.....
> View this message in context: http://r.789695.n4.nabble.com/customize-
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help