flextable (version 0.5.5)

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)

Arguments

x

a flextable object

zoom, expand

parameters used by webshot function.

See Also

Other flextable print function: docx_value, format.flextable, htmltools_value, knit_print.flextable, plot.flextable, print.flextable, save_as_html, save_as_image

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 DataCamp Workspace