
Last chance! 50% off unlimited learning
Sale ends in
Create a representation of a table. FlexTable can be
manipulated so that almost any formating can be specified.
It allows to insert headers and footers rows with
eventually merged cells (see FlexRow
,
addHeaderRow
and addFooterRow
).
Formating can be done on cells, paragraphs and texts
(borders, colors, fonts, etc.), see ?"[<-.FlexTable".
Content (formated or not) can be added with the function
addFlexCellContent
.
FlexTable(data, span.columns = character(0), header.columns = TRUE,
row.names = FALSE, cell_format = cellProperties(),
par_format = parProperties(), text_format = textProperties())
(a data.frame
or matrix
object)
to add
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] )
logical value - should the colnames
be included in the table as table headers. If FALSE, no
headers will be printed unless you use
addHeaderRow
.
logical value - should the row.names be included in the table.
default cells formatting properties for any data
default paragraphs formatting properties for any data
default texts formatting properties for any data
addFlexTable
, FlexRow
,
FlexCell
, addHeaderRow
and
addFooterRow
, pot
,
set_of_paragraphs
,
addFlexTable.docx
,
addFlexTable.pptx
,
addFlexTable.html
# NOT RUN {
#START_TAG_TEST
data( data_ReporteRs )
myFlexTable = FlexTable( data = data_ReporteRs
, span.columns = "col1", header.columns = TRUE
, row.names = FALSE )
myFlexTable[ 1:2, 2:3] = textProperties( color="red" )
myFlexTable[ 3:4, 4:5] = parProperties( text.align="right" )
myFlexTable[ 1:2, 5:6] = cellProperties( background.color="#F2969F")
#STOP_TAG_TEST
# }
Run the code above in your browser using DataLab