[R] Transferring R results to word prosessors

Tom Backer Johnsen backer at psych.uib.no
Fri Feb 10 19:25:49 CET 2006


At 09:25 10.02.2006 -0700, Gregory Snow wrote:

>Just to add a couple of thoughts to the previous suggestions.
>
>If you really want output from things like summary.lm to have tabs instead 
>of spaces then you can type:
>getAnywhere(print.summary.lm)
>
>at the R prompt and it will show you the (not quite) source of code that R 
>uses to do the printing to the console.  Copy this to your favorite text 
>editor and use it to create a new function (tabbed.summary.lm?), go 
>through and find the places where it prints output and change the spaces 
>to tabs (in some cases the inserted space is a default and you will not 
>see it directly).  You could even have the cat functions send the output 
>directly to the clipboard rather than the screen.

Interesting alternative.  However, there are at least two drawbacks for me 
at least.  First, one would have to make special versions of all the 
functions and types of output I might need.  That would easily become a 
major job, and probably not worth the trouble.  I will not need to do this 
operation often.  Second, I would have to distrubute the procedures to my 
students which I would like to avoid.

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/ |
+----------------------------------------------------------------+




More information about the R-help mailing list