Merci pour le lien,
J'ai testé ce code :
Code : Tout sélectionner
```{r echo=FALSE, fig.align="center", fig.height=6, fig.width=9, results='asis'}
Outil_Positionnement<- read.csv2(file.path(chemin_data,"DATA.csv",dec=".", na.string="")
ui <- fluidPage(
titlePanel("Outil positionnement"),
# Create a new Row in the UI for selectInputs
fluidRow(
column(4,
selectInput("CODEPDV",
"Code du magasin:",
c("All",
unique(as.character(data$CODEPDV))))
),
column(4,
selectInput("NOMOP",
"Tract S2 2017:",
c("All",
unique(as.character(data$NOMOP))))
),
column(4,
selectInput("FILIERE",
"Filière:",
c("All",
unique(as.character(data$FILIERE))))
)
),
# Create a new row for the table.
fluidRow(
DT::dataTableOutput("table")
)
)
server <- function (input, output) {
# Filter data based on selections
output$data <- DT::renderDataTable(DT::datatable({
data <- Outil_Positionnement
if (input$CODEPDV != "All") {
data <- data[data$CODEPDV == input$CODEPDV,]
}
if (input$NOMOP != "All") {
data <- data[data$NOMOP == input$NOMOP,]
}
if (input$FILIERE != "All") {
data <- data[data$FILIERE == input$FILIERE,]
}
data
}))
}
shinyApp(ui, server)
Et il m'indique une erreur que je ne comprends pas du tout :
Line 47 : Error in parse(text = x, srcfile = src) : <text>:6:1: unexpected symbol 5: 6: ui ^ calls: <Anonymous> ...
evaluate -> parse_all.character -> parse De plus : There were 14 warnings (use warning() to see them)
Si quelqu'un pouvait me l'expliquer, ça m'aiderait beaucoup :)