Hello ! I am a beginner in Shiny. My shiny app is correctly runing in Window/view Pane but not in in external (Firefox / Chrome). My Local browsers only show app title and selectInput default content. I am not able to use drop down menu and datatable not rendering.
Here is my piece of code :
library(dplyr)
library(shiny)
library(DT)
# reading data
communes_Cassini3 <- read.csv("designation_communes0001.csv")
dataset <- sort(unique(communes_Cassini3$source))
# UI
ui <- fluidPage(
# App title ----
titlePanel("mon appli"),
sidebarLayout(
# Input(s)
sidebarPanel(
selectInput(inputId = "commune",
label = "commune",
choices = dataset,
selected = "")
),
# datatable output
mainPanel(
DT::dataTableOutput(outputId = "table_de_donnees")
)
)
)
# Server
server <- function(input, output) {
# Create data table
output$table_de_donnees <- DT::renderDataTable({
fiche_commune <- communes_Cassini3 %>%
filter(source == input$commune) %>%
select(insee:designation_actuelle)
DT::datatable(data = fiche_commune,
options = list(pageLength = 10),
rownames = FALSE)
})
}
# Create a Shiny app object
shinyApp(ui = ui, server = server)