Skip to content

Printing from R Console in colour

4 messages · amarjit chandhial, Uwe Ligges, Jessica Streicher +1 more

#
On 04.07.2012 08:46, amarjit chandhial wrote:
You are talking about RGui in Windows? Then the answer is you cannot.

Uwe Ligges
#
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:

            
#
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: