if (FALSE) {
# create table
tab <- table(op=d.pizza$operator, area=d.pizza$area)
# send it to Word
wrd <- GetNewWrd()
wtab <- ToWrd(tab, wrd=wrd, tablestyle = NA)
# draw borders
WrdTableBorders(wtab, from=c(2,2), to=c(3,3), border=wdConst$wdBorderBottom, wrd=wrd)
WrdTableBorders(wtab, from=c(2,2), to=c(3,3), border=wdConst$wdBorderDiagonalUp, wrd=wrd)
# demonstrate linewidth and color
wtab <- ToWrd(tab, wrd=wrd, tablestyle = NA)
WrdTableBorders(wtab, col=RgbToLong(ColToRgb("olivedrab")),
lwd=wdConst$wdLineWidth150pt, wrd=wrd)
WrdTableBorders(wtab, border=wdConst$wdBorderBottom,
col=RgbToLong(ColToRgb("dodgerblue")),
lwd=wdConst$wdLineWidth300pt, wrd=wrd)
# use an R color in Word
RgbToLong(ColToRgb("olivedrab"))
# find a similar R-color for a Word color
ColToRgb(RgbToCol(LongToRgb(wdConst$wdColorAqua)))
}
Run the code above in your browser using DataLab