as_raster | R Documentation |
save a flextable as an image and return the corresponding raster. This function has been implemented to let flextable be printed on a ggplot object.
The function is no longer very useful since gen_grob()
exists and
will be deprecated in a future version.
as_raster(x, ...)
x |
a flextable object |
... |
additional arguments passed to other functions |
This function requires package 'magick'.
Other flextable print function:
df_printer()
,
flextable_to_rmd()
,
gen_grob()
,
htmltools_value()
,
knit_print.flextable()
,
plot.flextable()
,
print.flextable()
,
save_as_docx()
,
save_as_html()
,
save_as_image()
,
save_as_pptx()
,
save_as_rtf()
,
to_html.flextable()
ft <- qflextable(head(mtcars))
## Not run:
if (require("ggplot2") && require("magick")) {
print(qplot(speed, dist, data = cars, geom = "point"))
grid::grid.raster(as_raster(ft))
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.