flextable (version 0.5.11)

as_paragraph: concatenate chunks in a flextable

Description

The function is concatenating text and images within paragraphs of a flextable object, this function is to be used with function compose.

Usage

as_paragraph(..., list_values = NULL)

Arguments

...

chunk elements that are defining paragraph

list_values

a list of chunk elements that are defining paragraph. If specified argument ... is unused.

Illustrations

See Also

as_chunk, minibar, as_image, hyperlink_text

Examples

Run this code
# NOT RUN {
library(officer)
ft <- flextable( head(iris, n = 10 ))

ft <- compose(ft, j = 1,
  value = as_paragraph(
    minibar(value = Sepal.Length, max = max(Sepal.Length)),
    " ",
    as_chunk( Sepal.Length, formatter = formatC,
             props = fp_text(color = "orange") ),
    " blah blah"
  ),
  part = "body")

ft <- autofit(ft)
ft
# }

Run the code above in your browser using DataCamp Workspace