Function used to render flextable in knitr/rmarkdown documents. HTML, Word and PowerPoint outputs are supported.
Function htmltools_value
return an HTML version of the flextable,
this function is to be used within Shiny applications with renderUI()
.
# S3 method for flextable
knit_print(x, ...)
a flextable
object
further arguments, not used.
Result can be aligned with chunk option ft.align
that
accepts values 'left', 'center' and 'right'.
Result can be aligned with chunk option ft.align
that
accepts values 'left', 'center' and 'right'.
Word option 'Allow row to break across pages' can be
activated with chunk option ft.split
set to TRUE.
To specify a Word style for table caption use chunk option
tab.cap.style
. The default value is "Table Caption".
Position should be defined with options ft.left
and ft.top
. Theses are the top left coordinates
of the placeholder that will contain the table. They
default to {r ft.left=1, ft.left=2}
.
Using flextable with template pdf_document
is OK if the
flextable fits on one single page. The PDF output is not
a real latex output but a PNG image generated with package
'webshot' or package 'webshot2'. Package 'webshot2' should
be prefered as 'webshot' can have issues with some properties
(i.e. bold are not rendered for some users).
To specify usage of 'webshot2', use chunk option webshot="webshot2"
.
Other flextable print function:
as_raster()
,
docx_value()
,
format.flextable()
,
htmltools_value()
,
plot.flextable()
,
print.flextable()
,
save_as_docx()
,
save_as_html()
,
save_as_image()
,
save_as_pptx()