Rmarkdown : can we merge two cells with kableExtra?

好久不见. 提交于 2019-12-24 00:36:35

问题


Is there a way to merge two cells with kableExtra when knitting from Rmarkdown to HTML?

bbb = 5
aaa = data.frame(matrix(c(1,2,3,4, paste(bbb),""), nrow = 2, byrow = T))
aaa

I want the value bbb (the value of the merged cells varies) to appear in the middle of the last two columns when applying kable(aaa) %>% kableExtra(...)

> aaa
  X1 X2 X3
1  1  2  3
2  4  5

Any suggestion ? Thanks :-)

来源:https://stackoverflow.com/questions/58132626/rmarkdown-can-we-merge-two-cells-with-kableextra

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!