-
Notifications
You must be signed in to change notification settings - Fork 80
/
flextable_to_rmd.Rd
61 lines (57 loc) · 1.53 KB
/
flextable_to_rmd.Rd
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
51
52
53
54
55
56
57
58
59
60
61
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/printers.R
\name{flextable_to_rmd}
\alias{flextable_to_rmd}
\title{Knitr rendering in loops and if statements}
\usage{
flextable_to_rmd(x, ...)
}
\arguments{
\item{x}{a flextable object}
\item{...}{unused argument}
}
\description{
Print flextable in R Markdown or Quarto documents
within \code{for} loop or \code{if} statement.
The function is particularly useful when you want
to generate flextable in a loop from a R Markdown document.
Inside R Markdown document, chunk option \code{results} must be
set to 'asis'.
See \link{knit_print.flextable} for more details.
}
\examples{
\dontrun{
library(rmarkdown)
if (pandoc_available() &&
pandoc_version() > numeric_version("2")) {
demo_loop <- system.file(
package = "flextable",
"examples/rmd",
"loop_with_flextable.Rmd"
)
rmd_file <- tempfile(fileext = ".Rmd")
file.copy(demo_loop, to = rmd_file, overwrite = TRUE)
render(
input = rmd_file, output_format = "html_document",
output_file = "loop_with_flextable.html"
)
}
}
}
\seealso{
Other flextable print function:
\code{\link{as_raster}()},
\code{\link{df_printer}()},
\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}()},
\code{\link{save_as_rtf}()},
\code{\link{to_html.flextable}()}
}
\concept{flextable print function}