addFooterRow: add footer in a FlexTable

Description Usage Arguments See Also Examples

View source: R/FlexTablePublicAPI.R

Description

add a footer row in a FlexTable

Usage

1
2
addFooterRow(x, value, colspan, text.properties, par.properties,
  cell.properties)

Arguments

x

a FlexTable object

value

FlexRow object to insert as a footer row or a character vector specifying labels to use as columns labels.

colspan

integer vector. Optional. Applies only when argument value is a character vector. Vector specifying the number of columns to span for each corresponding value (in values).

text.properties

Optional. textProperties to apply to each cell. Used only if values are not missing.

par.properties

Optional. parProperties to apply to each cell. Used only if values are not missing.

cell.properties

Optional. cellProperties to apply to each cell. Used only if values are not missing.

See Also

FlexTable, addHeaderRow , alterFlexTable

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
if( check_valid_java_version() ){
# simple example ----
MyFTable <- FlexTable( data = iris[1:5,1:4] )

# add a footer row with 1 cell that spans four columns
MyFTable <- addFooterRow( MyFTable, value =
  c("a note in table footer"), colspan = 4 )

# another example ----

# create a FlexTable
MyFTable <- FlexTable( data = iris[1:5,1:4] )

# define a complex formatted text
mytext <- pot("*", format = textProperties(
  vertical.align="superscript", font.size = 9) ) +
  pot( " this text is superscripted", format = textProperties(font.size = 9) )

# create a FlexRow - container for 1 cell
footerRow <- FlexRow()
footerRow[1] <- FlexCell( mytext, colspan = 4 )

# finally, add the FlexRow to the FlexTable
MyFTable <- addFooterRow( MyFTable, footerRow )
}

davidgohel/ReporteRs documentation built on Dec. 4, 2018, 5:10 p.m.