【发布时间】:2018-05-24 09:55:01
【问题描述】:
我认为bsplus 包在开发动态网络时是相关的。我在 Rstudio 中使用 R Markdown。
但是,我发现将 bsplus 函数与 R 输出集成的方式特别棘手。
让我们看一个使用bs_accordion 函数的示例,使用mtcars 数据集
head <- head(mtcars)
tail <- tail(mtcars)
bs_accordion(id ="Data: mtcars") %>%
bs_append(title = "Head of mtcars", content = head) %>%
bs_append(title = "Tail of mtcars", content = tail)
我想在手风琴函数中显示 R 输出,显示数据帧 head 和 tail。
现在,它只显示head 中的第一个数字行。
是否有可能在bsplus 函数的content 属性中包含R 代码?
通过这种方式,我们能够以动态方式显示 R 结果。
【问题讨论】:
标签: html r r-markdown accordion bootstrap-accordion