plot.flextable | R Documentation |
plots a flextable as a grid grob object and display the result in a new graphics window. 'ragg' or 'svglite' or 'ggiraph' graphical device drivers should be used to ensure a correct rendering.
## S3 method for class 'flextable'
plot(x, ...)
x |
a flextable object |
... |
additional arguments passed to |
It's important to note that captions are not part of the table itself. This means when exporting a table to PNG or SVG formats (image formats), the caption won't be included. Captions are intended for document outputs like Word, HTML, or PDF, where tables are embedded within the document itself.
Other flextable print function:
as_raster()
,
df_printer()
,
flextable_to_rmd()
,
gen_grob()
,
htmltools_value()
,
knit_print.flextable()
,
print.flextable()
,
save_as_docx()
,
save_as_html()
,
save_as_image()
,
save_as_pptx()
,
save_as_rtf()
,
to_html.flextable()
library(gdtools)
library(ragg)
register_liberationsans()
set_flextable_defaults(font.family = "Liberation Sans")
ftab <- as_flextable(cars)
tf <- tempfile(fileext = ".png")
agg_png(
filename = tf, width = 1.7, height = 3.26, unit = "in",
background = "transparent", res = 150
)
plot(ftab)
dev.off()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.