Learn R Programming

flextable (version 0.7.0)

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(flextable)
ft <- flextable(airquality[sample.int(150, size = 10), ])
ft <- compose(ft,
  j = "Wind",
  value = as_paragraph(
    as_chunk(Wind, props = fp_text_default(color = "orange")),
    " ",
    minibar(value = Wind, max = max(airquality$Wind), barcol = "orange", bg = "black", height = .15)
  ),
  part = "body"
)
ft <- autofit(ft)
ft
# }

Run the code above in your browser using DataLab