addFlexTable

0th

Percentile

Insert a FlexTable into a document object

Insert a FlexTable into a document object

FlexTable can be manipulated so that almost any formatting can be specified. See FlexTable for more details.

Usage
addFlexTable(doc, flextable, ...)
"addFlexTable"(doc, flextable, par.properties = parProperties(text.align = "left"), bookmark, ...)
"addFlexTable"(doc, flextable, par.properties = parProperties(text.align = "left"), ...)
"addFlexTable"(doc, flextable, offx, offy, width, height, ...)
Arguments
doc
document object
flextable
the FlexTable object
...
further arguments passed to other methods
par.properties
paragraph formatting properties of the paragraph that contains the table. An object of class parProperties
bookmark
a character vector specifying bookmark id (where to put the table). If provided, table will be add after paragraph that contains the bookmark. See bookmark. If not provided, table will be added at the end of the document.
offx
optional, x position of the shape (top left position of the bounding box) in inches. See details.
offy
optional, y position of the shape (top left position of the bounding box) in inches. See details.
width
optional, width of the shape in inches. See details.
height
optional, height of the shape in inches. See details.
Details

When document is a pptx object, two positioning methods are available.

If arguments offx, offy, width, height are missing, position and dimensions will be defined by the width and height of the next available shape of the slide. This dimensions can be defined in the layout of the PowerPoint template used to create the pptx object.

If arguments offx, offy, width, height are provided, they become position and dimensions of the new shape.

Value

a document object

See Also

FlexTable, docx , pptx, bsdoc

Aliases
  • addFlexTable
  • addFlexTable.bsdoc
  • addFlexTable.docx
  • addFlexTable.pptx
Examples

options( "ReporteRs-fontsize" = 11 )

ft_obj <- vanilla.table(mtcars)

# docx example -----
doc = docx( )
doc = addFlexTable( doc, flextable = ft_obj )
writeDoc( doc, file = "add_ft_ex.docx" )


# bsdoc example -----
doc = bsdoc( )
doc = addFlexTable( doc, flextable = ft_obj )
writeDoc( doc, file = "add_ft_ex/index.html" )


# bsdoc example -----
doc = pptx( )
doc = addSlide( doc, slide.layout = "Title and Content" )
doc = addFlexTable( doc, flextable = ft_obj )
writeDoc( doc, file = "add_ft_ex.pptx" )


Documentation reproduced from package ReporteRs, version 0.8.6, License: GPL-3

Community examples

Looks like there are no examples yet.