This function is used to insert grid objects into flextable with functions:
Note
This chunk option requires package officedown in a R Markdown context with Word output format.
PowerPoint cannot mix images and text in a paragraph, images are removed when outputing to PowerPoint format.
See also
Other chunk elements for paragraph:
as_b()
,
as_bracket()
,
as_chunk()
,
as_equation()
,
as_highlight()
,
as_i()
,
as_image()
,
as_sub()
,
as_sup()
,
as_word_field()
,
colorize()
,
gg_chunk()
,
hyperlink_text()
,
linerange()
,
lollipop()
,
minibar()
,
plot_chunk()
Examples
library(flextable)
ft_1 <- flextable(head(cars))
if (require("grid")) {
ft_1 <- prepend_chunks(
x = ft_1, i = 2, j = 2,
grid_chunk(
list(
circleGrob(gp = gpar(
fill = "#ec11c2",
col = "transparent"
))
),
width = .15, height = .15
)
)
}
#> Loading required package: grid
ft_1
speed
dist
4
2
4
10
7
4
7
22
8
16
9
10