背景
我通常使用 ReporteRs软件包将 “a” 高质量的矢量化图作为单个WORD文件。 一般R代码 用于执行此操作,如下所示。基本上,我将绘图封装为函数,将其称为“G”,然后请求ReporteRs包将“G”转换为word文件。
问题:
我想知道什么时候设备布局是这样的:
m <- matrix( c( 1,0, 1,3, 2,3, 2,0 ), nrow=2, ncol=4 ); layout(m)
(即3个地块)
是否仍然可以使用ReporteRs包将3个图转换为单个word文件?
library('ReporteRs')
doc = docx()
doc = addPlot(doc, fun = G, vector.graphic = TRUE, width = 4.5, height = 4.5,
par.properties = parCenter(), editable = T, fontname_serif = "Times New Roman",
fontname_sans = "Times New Roman", fontname_mono = "Times New Roman",
fontname_symbol = "Times New Roman")
writeDoc(doc, file = "plotname.docx")