flextable (version 0.5.5)

save_as_image: save a flextable as an image

Description

save a flextable as a png, pdf or jpeg image.

Usage

save_as_image(x, path, zoom = 3, expand = 10)

Arguments

x

a flextable object

path

image file to be created. It should end with .png, .pdf, or .jpeg.

zoom, expand

parameters used by webshot function.

See Also

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

Examples

Run this code
# NOT RUN {
ft <- flextable( head( mtcars ) )
ft <- autofit(ft)
tf <- tempfile(fileext = ".png")
# }
# NOT RUN {
if( require("webshot") ){
  save_as_image(x = ft, path = "myimage.png")
}
# }

Run the code above in your browser using DataLab