WrdTableBorders {DescTools} | R Documentation |
Draw Borders to a Word Table
Description
Drawing borders in a Word table is quite tedious. This function allows to select any range and draw border lines around it.
Usage
WrdTableBorders(wtab, from = NULL, to = NULL, border = NULL,
lty = wdConst$wdLineStyleSingle, col = wdConst$wdColorBlack,
lwd = wdConst$wdLineWidth050pt)
Arguments
wtab |
|
from |
integer, a vector with two elements specifying the left upper bound of the cellrange. |
to |
integer, a vector with two elements specifying the right bottom of the cellrange. |
border |
a Word constant ( |
lty |
a Word constant ( |
col |
a Word constant ( |
lwd |
a Word constant ( |
Value
nothing
Author(s)
Andri Signorell <andri@signorell.net>
See Also
Examples
## Not run:
# 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)))
## End(Not run)
[Package DescTools version 0.99.55 Index]