|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
save the result into a word fileHi, everyone:
I forget on how to save a result from R as a word document. For example, if I run the linear regression and want to save the result: summary(lm(y~x) in a word file. So I can show it later to my clients. Any idea on how to do this? Thanks a lot, Suyan ______________________________________________ R-help@... 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. |
|
|
|
|
|
Re: save the result into a word fileSome suggestions in increasing complexity:
1. Cut-and-paste from the R console. (Cut-and-paste has got to be the best computer invention ever.) 2. If you want to generate the output automatically from an unattended script, try help("cat") and help("file") 3. Try help("Sweave") for even more automated document production. Also package "odfWeave" and perhaps "R2HTML" 4. More Microsofty approaches are in packages c("R2PPT", "rcom") and also "WriteXLS". Personally, I like the first option. Allan. On 02/07/09 18:26, Suyan Tian wrote: > Hi, everyone: > > I forget on how to save a result from R as a word document. For > example, if I run the linear regression and want to save the result: > > summary(lm(y~x) > > in a word file. So I can show it later to my clients. Any idea on how > to do this? > > Thanks a lot, > > > Suyan > > ______________________________________________ > R-help@... 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. [[alternative HTML version deleted]] ______________________________________________ R-help@... 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. |
|
|
Re: save the result into a word fileHello,
On Fri, Jul 3, 2009 at 2:15 PM, Allan Engelhardt<allane@...> wrote: > 1. Cut-and-paste from the R console. (Cut-and-paste has got to be the > best computer invention ever.) > First option is probably interesting when using in Word a monospace font for R results. For tables, you can also go via copy from R and paste in Excel (or OpenOffice Calc), and then switch the table to the word processor. > 2. If you want to generate the output automatically from an unattended > script, try help("cat") and help("file") > > 3. Try help("Sweave") for even more automated document production. Also > package "odfWeave" and perhaps "R2HTML" > >From the HTML options, you can also generate HTML code using xtable or Hmisc::html(), and then import the formatted results in Word or Excel. Liviu ______________________________________________ R-help@... 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. |
|
|
Re: save the result into a word fileHow about export it to a HTML and then copy to MS word.
I have packaged some code to export lm object to HTML in AJS style. You can have a look at ASAtable (http://r-forge.r-project.org/R/?group_id=328). Ronggui 2009/7/3 Suyan Tian <stian@...>: > Hi, everyone: > > I forget on how to save a result from R as a word document. For example, if > I run the linear regression and want to save the result: > > summary(lm(y~x) > > in a word file. So I can show it later to my clients. Any idea on how to do > this? > > Thanks a lot, > > > Suyan > > ______________________________________________ > R-help@... 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. > -- HUANG Ronggui, Wincent PhD Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html ______________________________________________ R-help@... 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. |
|
|
Re: save the result into a word fileOne technique that I use a screen capture that you can paste into the
document. This works nicely since it will also capture the color/size of the fonts. Works well for the graphics that you want to include. If you have MS OneNote, you can use this. There is a freeware package (MWSnap) that I also use that works fine. This also gives you a resizable image that you can make fit into your Word or PowerPoint document. On Fri, Jul 3, 2009 at 10:06 AM, Liviu Andronic<landronimirc@...> wrote: > Hello, > > On Fri, Jul 3, 2009 at 2:15 PM, Allan Engelhardt<allane@...> wrote: >> 1. Cut-and-paste from the R console. (Cut-and-paste has got to be the >> best computer invention ever.) >> > First option is probably interesting when using in Word a monospace > font for R results. For tables, you can also go via copy from R and > paste in Excel (or OpenOffice Calc), and then switch the table to the > word processor. > > >> 2. If you want to generate the output automatically from an unattended >> script, try help("cat") and help("file") >> >> 3. Try help("Sweave") for even more automated document production. Also >> package "odfWeave" and perhaps "R2HTML" >> > >From the HTML options, you can also generate HTML code using xtable or > Hmisc::html(), and then import the formatted results in Word or Excel. > Liviu > > ______________________________________________ > R-help@... 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. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? ______________________________________________ R-help@... 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. |
| Free embeddable forum powered by Nabble | Forum Help |