html - 如何让 includeHTML 在多个 TabPanel 中工作?
问题描述
我正在尝试在 Shiny 应用程序的不同 tabPanel 分隔中包含 2 个 HTML 文件。我这样做了,其中一个 html 文件正确呈现,但另一个小部件不显示。有谁知道为什么?我在下面发布了应用程序代码。
library(shiny)
ui <- navbarPage(div(img(src = "bookofnumberslogo.jpg", height = 50, width = 50) ,"OSC Elections"),
windowTitle = "OSC Elections",
tabPanel(
title = "House Forecast",
mainPanel(
h1("House of Representatives Forecast"),
p("This forecast is updated daily in accordance with the latest polling data."),
p("Last Updated: ", date()),
p("Email oscelections@gmail.com or find us on Twitter at @OSCElections if you have any questions."),
includeHTML("elexsimGS.html")
)),
tabPanel(
title = "MA Senate Democratic Primary",
mainPanel(
h1("Massachusetts Senate Election Democratic Primary Forecast"),
p("This forecast estimate has last been updated on: ", date()),
p("Email oscelections@gmail.com or find us on Twitter at @OSCElections if you have any questions."),
includeHTML("MA-Senate-Model.html")
))
)
server <- function(input, output) {
}
# Run the application
shinyApp(ui = ui, server = server)
解决方案
推荐阅读
- visual-studio-code - VS Code - 将这些推荐的设置粘贴到您的工作区设置中
- c++ - 如何使用 key2 更新 STL 映射 key1 并将值复制到 key2
- laravel - Laravel 两次加载所有页面
- python - 我如何在 python 中扎根(除平方根)?
- perl - 我有十六进制转储中的数据,但不知道编码。例如。0x91 0x05 = 657
- excel - 如果每月出现少于 5 次,则将行标记为红色
- scala - 在 Scala 中,如何在执行期间找到有效的隐式方法、声明和转换
- three.js - THREE.js 辅助摄像机在 VR 中随头部旋转而旋转
- javascript - 无法发送到特定客户端:Socket IO 将其发送到每个客户端?
- asp.net-core - 从带有 EF Core 的 asp.net 核心中的视图插入到多对多关系