1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/printers.R
\name{as_raster}
\alias{as_raster}
\title{get a flextable as a raster}
\usage{
as_raster(x, zoom = 2, expand = 2, webshot = "webshot", ...)
}
\arguments{
\item{x}{a flextable object}
\item{zoom, expand}{parameters used by \code{webshot} function.}
\item{webshot}{webshot package as a scalar character, one of "webshot" or
"webshot2".}
\item{...}{additional arguments passed to other functions}
}
\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.
}
\note{
This function requires packages: webshot and magick.
}
\examples{
ft <- qflextable(head(mtcars))
\dontrun{
if (require("ggplot2") && require("webshot")) {
print(qplot(speed, dist, data = cars, geom = "point"))
grid::grid.raster(as_raster(ft))
}
}
}
\seealso{
Other flextable print function:
\code{\link{df_printer}()},
\code{\link{flextable_to_rmd}()},
\code{\link{gen_grob}()},
\code{\link{htmltools_value}()},
\code{\link{knit_print.flextable}()},
\code{\link{plot.flextable}()},
\code{\link{print.flextable}()},
\code{\link{save_as_docx}()},
\code{\link{save_as_html}()},
\code{\link{save_as_image}()},
\code{\link{save_as_pptx}()}
}
\concept{flextable print function}
|