flextable (version 0.5.11)

as_raster: get a flextable as a raster

Description

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.

Usage

as_raster(x, zoom = 2, expand = 2, webshot = "webshot")

Arguments

x

a flextable object

zoom, expand

parameters used by webshot function.

webshot

webshot package as a scalar character, one of "webshot" or "webshot2".

See Also

Other flextable print function: docx_value(), htmltools_value(), knit_print.flextable(), plot.flextable(), print.flextable(), save_as_docx(), save_as_html(), save_as_image(), save_as_pptx()

Examples

Run this code
# NOT RUN {
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))
}
# }

Run the code above in your browser using DataLab