prepend_chunks: Prepend chunks to flextable content

View source: R/append_chunk.R

prepend_chunksR Documentation

Prepend chunks to flextable content

Description

prepend chunks (for example chunk as_chunk()) in a flextable.

Usage

prepend_chunks(x, ..., i = NULL, j = NULL, part = "body")

Arguments

x

a flextable object

...

chunks to be prepended, see as_chunk(), gg_chunk() and other chunk elements for paragraph.

i

rows selection

j

column selection

part

partname of the table (one of 'body', 'header', 'footer')

See Also

Other functions for mixed content paragraphs: append_chunks(), as_paragraph(), compose()

Examples

x <- flextable(head(iris))
x <- prepend_chunks(
  x,
  i = 1, j = 1,
  colorize(as_b("Hello "), color = "red"),
  colorize(as_i("World"), color = "magenta")
)
x

davidgohel/flextable documentation built on April 18, 2024, 11:37 a.m.