Hi,I want to be able to print in colour from the R console i.e. commands (in navy) with results (in red) as on the console. From the console if I click on File -> Print, the commands with results print on my printer but only in monochrome, not in colour. Similarly, if I Edit -> Select All, Edit -> Copy --- and paste into Word, the commands and results are only in monochrome, not in colour. How do I enable R to print commands and results in colour? Thanks [[alternative HTML version deleted]]
On 04.07.2012 08:46, amarjit chandhial wrote:> Hi,I > want to be able to print in colour from the R console i.e. commands (in navy) with > results (in red) as on the console. > > From > the console if I click on File -> Print, the commands with results print > on my printer but only in monochrome, not in colour. Similarly, if I Edit -> > Select All, Edit -> Copy --- and paste into Word, the commands and results > are only in monochrome, not in colour. > How > do I enable R to print commands and results in colour? ThanksYou are talking about RGui in Windows? Then the answer is you cannot. Uwe Ligges> [[alternative HTML version deleted]] > > > > ______________________________________________ > R-help at r-project.org 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. >
I would guess that that highly depends on -what exact "console" you have -where exactly you paste it For example, if i copy stuff from my console (Eclipse plugin StatEt) into this Mailprogram, it is still colored. With programs similar to word, they usually have paste options that tell you what of the formatting to retain (color,font,size, etc) If you can print directly in color depends even more on the version of console your using, since, for example, mine has no such option at all. Printing in color at all depends on having a color-printer with color in it, i know it sounds dumb but check it ;) Also printer options may be set to black and white by default, so check that too. So, really, more info needed^^ On 04.07.2012, at 08:46, amarjit chandhial wrote:> Hi,I > want to be able to print in colour from the R console i.e. commands (in navy) with > results (in red) as on the console. > > From > the console if I click on File -> Print, the commands with results print > on my printer but only in monochrome, not in colour. Similarly, if I Edit -> > Select All, Edit -> Copy --- and paste into Word, the commands and results > are only in monochrome, not in colour. > How > do I enable R to print commands and results in colour? Thanks > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org 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.
As has been mentioned, the windows GUI will not do this for you, but here are some options. You can save or copy the transcript file and load it into an R syntax aware editor (e.g. emacs with ess and others) which will do the coloring/formatting for you and may be able to print with the coloring. You can create the transcript using the etxtStart function in the TeachingDemos package which can then be converted to a file with the coloring (future versions will aslo create rtf or pandoc markdown files to do something similar). You can use the knitr package (or relatives) to run your code and have the input vs. output nicely formatted. On Wed, Jul 4, 2012 at 12:46 AM, amarjit chandhial <a.chandhial at btinternet.com> wrote:> Hi,I > want to be able to print in colour from the R console i.e. commands (in navy) with > results (in red) as on the console. > > From > the console if I click on File -> Print, the commands with results print > on my printer but only in monochrome, not in colour. Similarly, if I Edit -> > Select All, Edit -> Copy --- and paste into Word, the commands and results > are only in monochrome, not in colour. > How > do I enable R to print commands and results in colour? Thanks > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help at r-project.org 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. >-- Gregory (Greg) L. Snow Ph.D. 538280 at gmail.com