Reputation: 183
Is-there a way to change a value in a flextable? in version 0.4.7.003 it was possible to do it like this (this doesn't work anymore in 0.5.1):
library(flextable)
ft <- flextable( head( iris ))
ft$body$dataset[2,5] <- 'XXXXXXXX'
ft
Upvotes: 4
Views: 2853
Reputation: 10675
You can use the function flextable::compose
:
library(flextable)
ft <- flextable( head( iris ))
ft <- compose(ft, i = 2, j = 5, as_paragraph(as_chunk('XXXXXXXX')))
ft
Upvotes: 11