grid_chunk | R Documentation |
This function is used to insert grid objects into flextable with functions:
compose()
and as_paragraph()
,
append_chunks()
,
prepend_chunks()
.
grid_chunk(value, width = 1, height = 0.2, unit = "in", res = 300)
value |
grid objects, stored in a list column; or a list of grid objects. |
width , height |
size of the resulting png file |
unit |
unit for width and height, one of "in", "cm", "mm". |
res |
resolution of the png image in ppi |
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.
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()
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
)
)
}
ft_1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.