r - 在给出一个带有串扰和情节组合的代码块之后。我无法正确导出任何 html 输出
问题描述
我必须在 Rmarkdown 文档的一侧制作一个带有下拉过滤器菜单的条形图。但是问题是,当我将它添加为“r 块”时,我无法将其导出为静态 html 格式。
问题是在我的工作中使用 R shiny 是一种可行的方法。所以这是我到目前为止的代码:
library(crosstalk)
library(ggplot2)
library(plotly)
iris_data <-
SharedData$new(iris, key = ~Species, group = "Select Specie")
bscols(
filter_select("species", "Species", iris_data, ~Species, multiple = FALSE)
,
plot_ly(iris_data, x = ~Sepal.Length, y = ~Petal.Length, type = 'bar', name = ~Species, color= ~Species, text = ~ Sepal.Width) %>% layout(iris_data, barmode = 'stack'))
另一方面,当我将文档编织成 html 时,预览仅显示顶部标题部分,然后冻结,当我尝试使用 Firefox 打开它时,html 文件崩溃。感谢您的任何建议!
解决方案
推荐阅读
- javascript - 尝试使用包裹构建项目,但一直遇到不支持的文件类型错误
- python - 获取 143.859 Unicode 标准版本 13.0.0 字符的列表
- php - PHP Mailer 不从变量地址发送电子邮件
- c++ - 我不明白 glGenVertexArrays 和 glBindVertexArray 是如何工作的
- android-listview - 对话框 Upnp 创建连接的设备菜单
- google-apps-script - 表格自定义函数使用哪种 Apps 脚本部署?
- python - 用于将图像绘制到 python 屏幕的图形库
- php - 使用 PHP 签署 XML 文件,但不要将私钥密码存储在开放文本中
- python - 检查 2D 列表中的列表是否重复多次获取重复次数
- .net - 如何在 Visual Basic 中减小 WebBrowser 中的图像大小