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)

Arguments

x

a flextable object

zoom, expand

parameters used by webshot function.

Note

This function requires packages: webshot and magick.

See also

Examples

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)) } # }