get a flextable as a raster
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.
as_raster(x, zoom = 2, expand = 2, webshot = "webshot")
x |
a flextable object |
zoom, expand |
parameters used by |
webshot |
webshot package as a scalar character, one of "webshot" or "webshot2". |
This function requires packages: webshot and magick.
Other flextable print function:
df_printer(),
flextable_to_rmd(),
htmltools_value(),
knit_print.flextable(),
plot.flextable(),
print.flextable(),
save_as_docx(),
save_as_html(),
save_as_image(),
save_as_pptx()
ft <- qflextable( head( mtcars ) )
## Not run:
if( require("ggplot2") && require("webshot") ){
print(qplot(speed, dist, data = cars, geom = "point"))
grid::grid.raster(as_raster(ft))
}
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.