
Last chance! 50% off unlimited learning
Sale ends in
Modify flextable displayed values. Function is handling complex formatting as well as image insertion.
compose(x, i = NULL, j = NULL, value, part = "body")mk_par(x, i = NULL, j = NULL, value, part = "body")
a flextable object
rows selection
column selection
a call to function as_paragraph
.
partname of the table (one of 'all', 'body', 'header', 'footer')
Function mk_par
is another name for compose
as
there is an unwanted conflict with package purrr
.
Other cells formatters:
colformat_char()
,
colformat_int()
,
colformat_lgl()
,
colformat_num()
# NOT RUN {
library(officer)
ft <- flextable(head( mtcars, n = 10))
ft <- compose(ft, j = "carb", i = ~ drat > 3.5,
value = as_paragraph("carb is ", as_chunk( sprintf("%.1f", carb)) )
)
# }
# NOT RUN {
ft <- autofit(ft)
# }
Run the code above in your browser using DataLab