Rshiny includeHTML()灰显

Rshiny includeHTML()灰显,r,shiny,R,Shiny,我有一个shinyApp,它有关于各种质量指标的信息。 每个指示符都有一个关联的格式化word文档。 我想显示正确的文档,具体取决于选择的指示器。我已将word文件保存为htm文件,以便可以使用includeHTML() 库(闪亮) 图书馆(“xtable”) dir解决方案是将includeHTLM('path')替换为HTML(readLines('path')) library(shiny) library("xtable") dir <- "H:\\TEMP\\" print(

我有一个shinyApp,它有关于各种质量指标的信息。 每个指示符都有一个关联的格式化word文档。 我想显示正确的文档,具体取决于选择的指示器。我已将word文件保存为htm文件,以便可以使用includeHTML()

库(闪亮)
图书馆(“xtable”)

dir解决方案是将
includeHTLM('path')
替换为
HTML(readLines('path'))

library(shiny)
library("xtable")

dir <- "H:\\TEMP\\"

print(xtable(mtcars), type="html", file=paste0(dir, "example1.html"))
print(xtable(iris), type="html",   file=paste0(dir, "example2.html"))
print(xtable(cars), type="html",   file=paste0(dir, "example3.html"))


runApp(
  list(
 ui = fluidPage(
  sidebarLayout(
    sidebarPanel(
      selectInput("docselect", "Select:", c("example1.html", "example2.html", "example3.html"))
      , width = 2),

    mainPanel(

      tabsetPanel(
        tabPanel(title = "Empty"),
        tabPanel(title = "Results", uiOutput("DoC"))
      )
    )
  )
)

, server = function(input, output, session){
  output$DoC <- renderUI({includeHTML(path = paste0(dir, input$docselect))
  })

}
 )
)