Create an object that describes table formating properties.
tableProperties(header.text = textProperties(font.size = 12, font.weight = "bold"),
header.par = parProperties(padding = 3, text.align = "left"),
header.cell = cellProperties(border.width = 1, background.color = "#e8eaeb"),
groupedheader.text = textProperties(font.size = 12, font.weight = "bold"),
groupedheader.par = parProperties(padding = 3, text.align = "left"),
groupedheader.cell = cellProperties(border.width = 1, background.color = "#e8eaeb"),
double.text = textProperties(font.size = 12),
double.par = parProperties(padding = 3, text.align = "left"),
double.cell = cellProperties(),
integer.text = textProperties(font.size = 12),
integer.par = parProperties(padding = 3, text.align = "left"),
integer.cell = cellProperties(),
percent.text = textProperties(font.size = 12),
percent.par = parProperties(padding = 3, text.align = "left"),
percent.cell = cellProperties(),
character.text = textProperties(font.size = 12),
character.par = parProperties(padding = 3, text.align = "left"),
character.cell = cellProperties(),
date.text = textProperties(font.size = 12, font.style = "italic"),
date.par = parProperties(padding = 3, text.align = "left"),
date.cell = cellProperties(),
datetime.text = textProperties(font.size = 12, font.style = "italic"),
datetime.par = parProperties(padding = 3, text.align = "left"),
datetime.cell = cellProperties(),
logical.text = textProperties(font.size = 12, font.style = "italic"),
logical.par = parProperties(padding = 3, text.align = "left"),
logical.cell = cellProperties(),
percent.addsymbol = "%",
locale.language = getOption("ReporteRs-locale.language"),
locale.region = getOption("ReporteRs-locale.region"),
fraction.double.digit = 4L,
fraction.percent.digit = 3L, data.cell, data.par,
data.text)
cell formatting properties for columns of any type. Overwrites any *.cell (except headers)
paragraph formatting properties for columns of any type. Overwrites any *.par (except headers)
text formatting properties for columns of any type. Overwrites any *.text (except headers)
text formatting properties of column headers
paragraph formatting properties of column headers
cell formatting properties of column headers
text formatting properties of groupedheaders
paragraph formatting properties of groupedheaders
cell formatting properties of groupedheaders
text formatting properties of columns of type 'double'
paragraph formatting properties for columns of type 'double'
cell formatting properties for columns of type 'double'
text formatting properties for columns of type 'integer'
paragraph formatting properties for columns of type 'integer'
cell formatting properties for columns of type 'integer'
text formatting properties for columns of type 'percent'
paragraph formatting properties for columns of type 'percent'
cell formatting properties for columns of type 'percent'
text formatting properties for columns of type 'character'
paragraph formatting properties for columns of type 'character'
cell formatting properties for columns of type 'character'
text formatting properties for columns of type 'date'
paragraph formatting properties for columns of type 'date'
cell formatting properties for columns of type 'date'
text formatting properties for columns of type 'logical'
paragraph formatting properties for columns of type 'logical'
cell formatting properties for columns of type 'logical'
text formatting properties for columns of type 'datetime'
paragraph formatting properties for columns of type 'datetime'
cell formatting properties for columns of type 'datetime'
represents the symbol to add after percent data as been formated (character, default to '')
the minimum number of digits to the right of the decimal point in formatting 'double' data. Allowed values are fraction.double.digit >=0.
the minimum number of digits to the right of the decimal point in formatting 'percent' data. Allowed values are fraction.percent.digit >=0.
locale language symbol ("fr, "en", etc.) - default to getOption("ReporteRs-locale.language")
locale region symbol ("FR, "US", etc.) - default to getOption("ReporteRs-locale.region")
tableProperties is used to control table format when
addTable is used. One can customize headers (or grouped
headers) and content. Headers share all the same format.
Content is formated according to its data type
(col.types
argument in addTable
).
"double" columns share all the same format, "character"
columns share all the same format, etc. Conditionnal
formating is not specified in tableProperties but in
addTable
.
# NOT RUN {
# define table properties - set headers aligned on the right, font color is gray and font size is 12 points
tableProperties( header.text = textProperties(color="gray", font.size = 12)
, header.par = parProperties( text.align = "right" )
)
# }
Run the code above in your browser using DataLab