
Last chance! 50% off unlimited learning
Sale ends in
Add a table into a document object
addTable(doc, data, layout.properties, header.labels, groupedheader.row,
span.columns, col.types, columns.bg.colors, columns.font.colors, row.names,
...)
document object
(a data.frame
or matrix
object)
to add
a tableProperties
object
to specify styles to use to format the table. optional
a character whose elements define
labels to display in table headers instead of colnames.
Optional, if missing, headers will be filled with
data
column names.
a named list whose elements
define the upper header row (grouped header). Optional.
Elements of that list are values
and
colspan
. Element values
is a character
vector containing labels to display in the grouped header
row. Element colspan
is an integer vector
containing number of columns to span for each
values
.
a character vector specifying columns names where row merging should be done (if successive values in a column are the same ; if data[p,j]==data[p-1,j] )
a character whose elements define the formatting style of columns via their data roles. Optional Possible values are : "character", "integer", "logical" , "double", "percent", "date", "datetime". If missing, factor and character will be formated as character , integer as integer and numeric as double.
A named list of character
vector. Define the background color of cells for a given
column. optional. Names are data
column names and
values are character vectors specifying cells background
colors. Each element of the list is a vector of length
nrow(data)
.
logical value - should the row.names be included in the table.
A named list of character
vector. Define the font color of cells per column.
optional. A name list, names are data
column
names and values are character vectors specifying cells
font colors. Each element of the list is a vector of
length nrow(data)
.
further arguments passed to or from other methods..
a document object
The table below shows the display model used to format tables:
+--------------+---------------+
GROUPEDHEADER_1|GROUPEDHEADER_2|
+------+-------+-------+-------+
HEADER1|HEADER2|HEADER3|HEADER4|
+------+-------+-------+-------+
x[1,1]| x[1,2]| x[1,3]|| x[1,4]|
+------+-------+-------+-------+
x[2,1]| x[2,2]| x[2,3]|| x[2,4]|
+------+-------+-------+-------+
x[3,1]| x[3,2]| x[3,3]|| x[3,4]|
+------+-------+-------+-------+
See addTable.docx
or
addTable.pptx
or addTable.html
for examples.
docx
, addTable.docx
,
pptx
, addTable.pptx
,
html
, addTable.html