Skip to content

Beautify R scripts in microsoft word

4 messages · Daren Tan, Dale Steele, Yihui Xie

#
Open script in Tinn-R, select script to copy.  Then use menu Edit:Copy
formatted (to export) --> RTF

Paste into MS word.

--Dale
On Sat, Sep 13, 2008 at 1:30 PM, Daren Tan <daren76 at hotmail.com> wrote:
#
Or use the software Highlight: http://www.andre-simon.de/ (Remember
that you may need to change the R definition file 'r.lang' using the
function highlight.def() in package 'animation')

P. S. sorry Dale, I often forget to click "Reply to all" and as a
result, send my reply to a single person :-(

Yihui
On Sun, Sep 14, 2008 at 1:30 AM, Daren Tan <daren76 at hotmail.com> wrote:

  
    
#
And if you don't want to type spaces or indent manually when you write
your code, you may also use the function 'tidy.source()' (in the
package 'animation') to add spaces and indent automatically. For
example: http://animation.yihui.name/animation:misc#tidy_up_r_source

Hope this will "beautify" your code more :)

Yihui
On Sun, Sep 14, 2008 at 1:30 AM, Daren Tan <daren76 at hotmail.com> wrote: