WrdTableHeading | R Documentation |
Inserting headings in a table can be hard, when column headings should span several columns. This function helps to easily insert headings and merge cells.
WrdTableHeading(wtab, text, bold = TRUE,
alignment = wdConst$wdAlignParagraphCenter,
merge_cols = NULL, wrd = DescToolsOptions("lastWord"))
wtab |
the handle to a table in a word document |
text |
the text for the headings |
bold |
logical, for setting bold column headings, will be recycled. Default is |
alignment |
the alignment in the column headings, must be one out of the Word constant list |
merge_cols |
a vector consisting of entries to merge cells in the form |
wrd |
the pointer to a word instance. Can be a new one, created by |
Nothing returned.
Andri Signorell <andri@signorell.net
WrdTable
## Not run: # Windows-specific example
wrd <- GetNewWrd()
wtab <- WrdTable(nrow=3, ncol=5, wrd=wrd)
# insert headings and merge 1:2 and 4:5, such as there are
# only 3 headings
WrdTableHeading(wtab, text=c("First","Second",
"Third"),
alignment=c(wdConst$wdAlignParagraphLeft,
rep(wdConst$wdAlignParagraphCenter, 2)),
merge_cols = c("1:2", "4:5"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.