Skip to contents

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.

Usage

as_raster(x, ...)

Arguments

x

a flextable object

...

additional arguments passed to other functions

Note

This function requires package 'magick'.

Examples

ft <- qflextable(head(mtcars))
if (FALSE) {
if (require("ggplot2") && require("magick")) {
  print(qplot(speed, dist, data = cars, geom = "point"))
  grid::grid.raster(as_raster(ft))
}
}