I have just started looking at R, and are getting more and more irritated at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word. An example: If you use summary(lm(....)) you get nice output. However, if you try to paste that output into the word processor, all the text elements are separated by blanks, and that is not optimal for the creation of a table (in the word processing sense). Is there an option to generate tab-separated output in R ? That would solve the problem. Tom +----------------------------------------------------------------+ | Tom Backer Johnsen, Psychometrics Unit, Faculty of Psychology | | University of Bergen, Christies gt. 12, N-5015 Bergen, NORWAY | | Tel : +47-5558-9185 Fax : +47-5558-9879 | | Email : backer at psych.uib.no URL : http://www.galton.uib.no/ | +----------------------------------------------------------------+
Tranferring R results to word prosessors
16 messages · Gabor Grothendieck, Romain Francois, Sébastien Bihorel +10 more
In Word use a fixed font such as Courier rather than a proportional font and it will look ok.
On 2/9/06, Tom Backer Johnsen <backer at psych.uib.no> wrote:
I have just started looking at R, and are getting more and more irritated at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word. An example: If you use summary(lm(....)) you get nice output. However, if you try to paste that output into the word processor, all the text elements are separated by blanks, and that is not optimal for the creation of a table (in the word processing sense). Is there an option to generate tab-separated output in R ? That would solve the problem. Tom +----------------------------------------------------------------+ | Tom Backer Johnsen, Psychometrics Unit, Faculty of Psychology | | University of Bergen, Christies gt. 12, N-5015 Bergen, NORWAY | | Tel : +47-5558-9185 Fax : +47-5558-9879 | | Email : backer at psych.uib.no URL : http://www.galton.uib.no/ | +----------------------------------------------------------------+
______________________________________________ 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
Le 09.02.2006 15:41, Tom Backer Johnsen a ??crit :
I have just started looking at R, and are getting more and more irritated at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word. An example: If you use summary(lm(....)) you get nice output. However, if you try to paste that output into the word processor, all the text elements are separated by blanks, and that is not optimal for the creation of a table (in the word processing sense). Is there an option to generate tab-separated output in R ? That would solve the problem. Tom
Hi , One way could be to output in html format from R (with the R2HTML package) and then read back the html from your word processor Romain
visit the R Graph Gallery : http://addictedtor.free.fr/graphiques mixmod 1.7 is released : http://www-math.univ-fcomte.fr/mixmod/index.php +---------------------------------------------------------------+ | Romain FRANCOIS - http://francoisromain.free.fr | | Doctorant INRIA Futurs / EDF | +---------------------------------------------------------------+
Tom Backer Johnsen <backer at psych.uib.no> wrote:
[...]
However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word.
In case you're not talking about table-like output exclusively, reading ?Devices describes all the available kinds of graphical output. Most of these can then easily be included in MS Word. Cheers,
Sebastian P. Luque
I have added several convenient methods for sending data directly from R to Microsoft Word (report() function) in the svViews package (SciViews bundle). However, I still have to upload it to CRAN. I do it right now. It should be available in a couple of days. Best, Philippe Grosjean
Romain Francois wrote:
Le 09.02.2006 15:41, Tom Backer Johnsen a ??crit :
I have just started looking at R, and are getting more and more irritated at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word. An example: If you use summary(lm(....)) you get nice output. However, if you try to paste that output into the word processor, all the text elements are separated by blanks, and that is not optimal for the creation of a table (in the word processing sense). Is there an option to generate tab-separated output in R ? That would solve the problem. Tom
Hi , One way could be to output in html format from R (with the R2HTML package) and then read back the html from your word processor Romain
I agree that this is the best way. I often use Courier font with font size 10 that gives very good results.
On Thu, 2006-02-09 at 09:47 -0500, Gabor Grothendieck wrote:
In Word use a fixed font such as Courier rather than a proportional font and it will look ok. On 2/9/06, Tom Backer Johnsen <backer at psych.uib.no> wrote:
I have just started looking at R, and are getting more and more irritated at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word. An example: If you use summary(lm(....)) you get nice output. However, if you try to paste that output into the word processor, all the text elements are separated by blanks, and that is not optimal for the creation of a table (in the word processing sense). Is there an option to generate tab-separated output in R ? That would solve the problem. Tom +----------------------------------------------------------------+ | Tom Backer Johnsen, Psychometrics Unit, Faculty of Psychology | | University of Bergen, Christies gt. 12, N-5015 Bergen, NORWAY | | Tel : +47-5558-9185 Fax : +47-5558-9879 | | Email : backer at psych.uib.no URL : http://www.galton.uib.no/ | +----------------------------------------------------------------+
______________________________________________ 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
______________________________________________ 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
Tom Backer Johnsen wrote:
I have just started looking at R, and are getting more and more irritated at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word.
Well whatever you do, don't start looking at LaTeX, because that will get you even more irritated at yourself for not having done it before. LaTeX is to Word as R is to what? SPSS? I've still not seen a pretty piece of mathematics - or even text - in Word. Barry
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060209/2fd37dba/attachment.pl
Take a look at the facilities to write HTML output in library(R2HTML). If you write an HTML file, you can then easily copy and paste it into your Word document, or from MS Word you can use the Insert menu. i.e. library(R2HTML) x=ftable(Titanic, row.vars = 1:3) HTML(x,"Titanic.html") Then from MS Word use Insert-> File and select Titanic.html and see the results. I hope this helps Francisco
From: Tom Backer Johnsen <backer at psych.uib.no> To: r-help at stat.math.ethz.ch Subject: [R] Tranferring R results to word prosessors Date: Thu, 09 Feb 2006 15:41:09 +0100 I have just started looking at R, and are getting more and more irritated at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word. An example: If you use summary(lm(....)) you get nice output. However, if you try to paste that output into the word processor, all the text elements are separated by blanks, and that is not optimal for the creation of a table (in the word processing sense). Is there an option to generate tab-separated output in R ? That would solve the problem. Tom +----------------------------------------------------------------+ | Tom Backer Johnsen, Psychometrics Unit, Faculty of Psychology | | University of Bergen, Christies gt. 12, N-5015 Bergen, NORWAY | | Tel : +47-5558-9185 Fax : +47-5558-9879 | | Email : backer at psych.uib.no URL : http://www.galton.uib.no/ | +----------------------------------------------------------------+
______________________________________________ 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
There is some documentation online at: http://www.latex-project.org/guides/ which would be a good starting place. If you prefer a good book, The LaTeX Companion (aka TLC) is the place to begin: http://www.amazon.com/gp/product/0201362996 There is also a boxed set (expensive) of several books (including TLC) available: http://www.amazon.com/gp/product/0321269446 Finally, for dealing with EPS (or PDF) graphics (ie. R plots), the online document "Using Imported Graphics in LaTeX and pdfLaTeX" is excellent: http://www.ctan.org/tex-archive/info/epslatex.pdf HTH, Marc Schwartz
On Thu, 2006-02-09 at 12:33 -0500, roger bos wrote:
Yeah, but I don't understand LaTeX at all. Can you point me to a good beginners guide? Thanks, Roger On 2/9/06, Barry Rowlingson <B.Rowlingson at lancaster.ac.uk> wrote:
Tom Backer Johnsen wrote:
I have just started looking at R, and are getting more and more
irritated
at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word.
Well whatever you do, don't start looking at LaTeX, because that will get you even more irritated at yourself for not having done it before. LaTeX is to Word as R is to what? SPSS? I've still not seen a pretty piece of mathematics - or even text - in Word. Barry
One approach is to use LyX (http://www.lyx.org/). This is a lot like using Word or other word processors but it creates LaTeX. You probably won't need to know anything about TeX for a long time unless you are doing really weird things. Patrick Burns patrick at burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User")
roger bos wrote:
Yeah, but I don't understand LaTeX at all. Can you point me to a good beginners guide? Thanks, Roger On 2/9/06, Barry Rowlingson <B.Rowlingson at lancaster.ac.uk> wrote:
Tom Backer Johnsen wrote:
I have just started looking at R, and are getting more and more
irritated
at myself for not having done that before.
However, one of the things I have not found in the documentation is some
way of preparing output from R for convenient formatting into something
like MS Word.
Well whatever you do, don't start looking at LaTeX, because that will get you even more irritated at yourself for not having done it before. LaTeX is to Word as R is to what? SPSS? I've still not seen a pretty piece of mathematics - or even text - in Word. Barry
______________________________________________ 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
[[alternative HTML version deleted]]
______________________________________________ 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
roger bos <roger.bos at gmail.com> 2/9/2006 12:33 pm >>> wrote
<<< Yeah, but I don't understand LaTeX at all. Can you point me to a good beginners guide?
I like Math into LaTeX, by Gratzer. For a real beginners guide, there's one called first steps in LaTeX. You might also want to look at issues of the PracTEX journal, many of which are for beginners (It's an online journal) Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes 71 W. 23rd St http://cduhr.ndri.org www.peterflom.com New York, NY 10010 (212) 845-4485 (voice) (917) 438-0894 (fax)
"Marc Schwartz (via MN)" <mschwartz at mn.rr.com> 2/9/2006
<<< If you prefer a good book, The LaTeX Companion (aka TLC) is the place to begin: http://www.amazon.com/gp/product/0201362996 Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes 71 W. 23rd St http://cduhr.ndri.org www.peterflom.com New York, NY 10010 (212) 845-4485 (voice) (917) 438-0894 (fax)
I respectfully disagree. TLC is a great book. Absolutely. But I think it is overwhelming for a beginner. Peter
As much as I love LaTeX, I would be cautious on recommending it for someone with a short term objective or does not really need to write equations etc. Part of the reason is the initial step of getting the different softwares required to make LaTeX work properly can be difficult. However, I think this webpage does a good job of explaining it http://www.math.aau.dk/~dethlef/Tips/introduction.html WinEdt (http://www.winedt.com/) might also be worth checking out. Regards, Adai
On Thu, 2006-02-09 at 14:11 -0500, Peter Flom wrote:
roger bos <roger.bos at gmail.com> 2/9/2006 12:33 pm >>> wrote
<<< Yeah, but I don't understand LaTeX at all. Can you point me to a good beginners guide?
I like Math into LaTeX, by Gratzer. For a real beginners guide, there's one called first steps in LaTeX. You might also want to look at issues of the PracTEX journal, many of which are for beginners (It's an online journal) Peter Peter L. Flom, PhD Assistant Director, Statistics and Data Analysis Core Center for Drug Use and HIV Research National Development and Research Institutes 71 W. 23rd St http://cduhr.ndri.org www.peterflom.com New York, NY 10010 (212) 845-4485 (voice) (917) 438-0894 (fax)
______________________________________________ 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
At 11:42 10.02.2006 -0300, CENDOYA, Maria Gabriela wrote:
X-UIDL: PE5!!DnS!!np3"!Sl2"!
Hi Tom:
May be I didn't understand your question but, what I do to cut
and paste results from say summary.lm, in a word processors without losing
the nice shape of the R Console, is to choose the same type of letter in
both,
That works -- to some extent. But, that means that the formatting of the table is completely dependent on the number of spaces between the elements. It is essentially the same kind of formatting of tables I did on my first typewriter about 40 years ago. Any nontrivial change is troublesome, and you have to stick to fixed size fonts like Courier. Modern editors have moved far beyond that point. This is about generating a table in a text document from R type output. This type of table increases flexibility in respect to formatting.
I mean, in my R Gui preferences I use Courier New size 10, then if I choose that type of letter in my word processors, I see the same in both windows.
Yes. Tom +----------------------------------------------------------------+ | Tom Backer Johnsen, Psychometrics Unit, Faculty of Psychology | | University of Bergen, Christies gt. 12, N-5015 Bergen, NORWAY | | Tel : +47-5558-9185 Fax : +47-5558-9879 | | Email : backer at psych.uib.no URL : http://www.galton.uib.no/ | +----------------------------------------------------------------+
4 days later
I started using LyX; it is very straightforward. Then, I started exporting to LaTeX and playing around with the LaTeX file (I found it faster than using LyX, and could take my file anywhere they had something that could manipulate text ---emacs, vim, nedit, whatever). Googling you'll find _many_ LaTeX tutorials. Which one is best probably depends a lot on your preferences and learning style. As for books, I find "Guide to LaTeX" by Kopka & Daly (I think now in its fourth edition) far easier to use (to learn and for reference) than the series of LaTeX books by Goossens et al. and Lamport. (And I only need to haul around a single book, not 2 to 5). But then, again, this is surely a matter of personal taste. HTH, R.
On Thursday 09 February 2006 20:08, Patrick Burns wrote:
One approach is to use LyX (http://www.lyx.org/). This is a lot like using Word or other word processors but it creates LaTeX. You probably won't need to know anything about TeX for a long time unless you are doing really weird things. Patrick Burns patrick at burns-stat.com +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") roger bos wrote:
Yeah, but I don't understand LaTeX at all. Can you point me to a good beginners guide? Thanks, Roger On 2/9/06, Barry Rowlingson <B.Rowlingson at lancaster.ac.uk> wrote:
Tom Backer Johnsen wrote:
I have just started looking at R, and are getting more and more
irritated
at myself for not having done that before. However, one of the things I have not found in the documentation is some way of preparing output from R for convenient formatting into something like MS Word.
Well whatever you do, don't start looking at LaTeX, because that will get you even more irritated at yourself for not having done it before. LaTeX is to Word as R is to what? SPSS? I've still not seen a pretty piece of mathematics - or even text - in Word. Barry
______________________________________________ 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
[[alternative HTML version deleted]]
______________________________________________ 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
______________________________________________ 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
Ram??n D??az-Uriarte Bioinformatics Unit Centro Nacional de Investigaciones Oncol??gicas (CNIO) (Spanish National Cancer Center) Melchor Fern??ndez Almagro, 3 28029 Madrid (Spain) Fax: +-34-91-224-6972 Phone: +-34-91-224-6900 http://ligarto.org/rdiaz PGP KeyID: 0xE89B3462 (http://ligarto.org/rdiaz/0xE89B3462.asc) **NOTA DE CONFIDENCIALIDAD** Este correo electr??nico, y en s...{{dropped}}