kable_styling()导致消失的桌子
由于某种原因,kable()起作用,但是每当我将其输送到kable_styling()中时,输出都是故障。在预览中,我可以在消失之前简要查看数值数据(如一秒钟)。现在只是一个空表。
加载的软件包是 图书馆(Gridextra) 图书馆(htmltools) 图书馆(Knitr) 图书馆(kablextra) 图书馆(sjplot) 图书馆(整洁)
For some reason, kable() works but whenever I pipe it into kable_styling(), the output is faulty. In the preview, I can briefly see the numerical data (for like a split second) before it disappears. It's just an empty table now.
The loaded packages are
library(gridExtra)
library(htmltools)
library(knitr)
library(kableExtra)
library(sjPlot)
library(tidyverse)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以重现这个问题:
在rstudio的R笔记本中,在管道提供在线表之前的代码,但是添加第二部分会导致表中的数据在吐痰第二秒后消失,如所述。
在Save_kable()中添加另一个管道确实会在保存的文件中生成一个图。在RSTUDIO中,在R脚本中运行代码也可以按预期生成图形。因此,大概问题与笔记本上下文中的rstudio解释有关。
I can reproduce the issue:
In an R Notebook in Rstudio, code before the pipe gives an in-line table, but adding the second part causes the data in the table to vanish after a spit second as described.
Adding a further pipe to save_kable() does generate a plot in the saved file. Also running the code in an R script in Rstudio generates the graphic as expected. So presumably the problem is something to do with the RStudio interpretation of the in the context of a Notebook.