I am trying to create a dashboard with a SelectInput where there will be several choices, and picking a different choice will run a different HTML script on the main panel. To do this, I used the solution in the following StackOverflow question. Display HTML file in Shiny App. However, the HTML script is not rendered when I try the code. I created a sample include.html file and put it in the same folder as my shiny app. Could anyone tell me why it may not be working?
Here is the code from the other question.
library(shiny)
ui <- fluidPage(
titlePanel("Uploading Files"),
mainPanel(
htmlOutput("inc")
)
)
# ----- server.R -----
server <- function(input, output) {
getPage<-function() {
return(includeHTML("include.html"))
}
output$inc<-renderUI({getPage()})
}
Included Content