flextable (version 0.5.5)

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.

See Also

as_chunk, minibar, as_image, hyperlink_text

Examples

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

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

autofit(myft)
# }

Run the code above in your browser using DataCamp Workspace