Learn R Programming

R2wd (version 1.4)

wdVerbatim: write verbatim text to word (for example model output).

Description

write single spaced text in (by default) Courier font to word. This is useful to render R output 'as is'.

Usage

wdVerbatim(text = "", paragraph = TRUE, fontsize = 9, fontname = "Courier New", wdapp = .R2wd)

Arguments

text
the text to write
paragraph
whether the chunk should be closed by a paragraph return.
fontsize
size of the font
fontname
name of the font
wdapp
handle to the Word application (usually not used).

Value

    Details

    Saves the current style. Wwitches to Courier New, single spaced, 9 pt (by default) and renders the text. Switches back to the previous style.

    Examples

    Run this code
    wdGet()
    tt<-capture.output(summary(lm(mpg~hp,data=mtcars)))
    wdVerbatim(tt)

    Run the code above in your browser using DataLab