更改flextable中的单元格值

问题描述 投票:1回答:1

有没有办法改变flextable中的值?在版本0.4.7.003中,可以这样做(这在0.5.1中不再起作用):

library(flextable)
ft <- flextable( head( iris ))
ft$body$dataset[2,5] <- 'XXXXXXXX'
ft
r cell edit flextable
1个回答
1
投票

你可以使用flextable::compose函数:

library(flextable)
ft <- flextable( head( iris ))
ft <- compose(ft, i = 2, j = 5, as_paragraph(as_chunk('XXXXXXXX')))
ft
© www.soinside.com 2019 - 2024. All rights reserved.