rvg (version 0.0.9)

write_docx: Microsoft Word Graphics Device

Description

A graphical device for Microsoft Word documents.

Usage

write_docx(file, code, pagesize = c(width = 8.5, height = 11),
  margins = c(left = 1, right = 1, top = 1, bottom = 1), ...)

Arguments

file
filename of the Microsoft Word document to produce. File extension must be .docx.
code
Plotting code to execute
pagesize
Word document page size in inches. A named vector (width and height).
margins
Word document margins size in inches. A named vector (left, right, top, bottom).
...
arguments for fun (passed on to dml_docx.)

Examples

Run this code
write_docx(file = "my_plot_1.docx", code = plot(rnorm(10)) )
write_docx(file = "my_plot_2.docx", code = barplot(1:7, col = 1:7))

Run the code above in your browser using DataLab