I am a beginner in this forum. I have a question on R shiny. I looked at some discussions about it in this forum but answers (R Shiny - add tabPanel to tabsetPanel dynamically (with the use of renderUI)) don't fit exactly what i am looking for.
I try to add some tabPalnels in navbarMenu with interaction: example I choose a directory and I list how many files are in and what are their names. then I would like to make tabPanel in navbarMenu which have the name of the files in the directory
ex :if dir = c:/charlotte/RY list.files(dir) = c(fichier1.csv, fichier2.csv)
I would like that the names of 2 tabpanels from the navbarMenu are called fichier1.csv and fichier2.csv. I try it but without results. I give you my code :
shinyUI(navbarPage("raster analysis",
tabPanel("Analysis parameters",
actionButton("goButton","load session to analyze"),
textOutput("session")
),
navbarMenu("NISTs",
tabPanel("Set up"
),
tabPanel("About"
)
),
navbarMenu("Samples",
tabPanel("Set up"
),
tabPanel("About"
)
))
shinyServer(function(input, output) {
observe({
if(input$goButton > 0){
output$session = renderUI({
list.files(choose.dir(),pattern="\\.csv$")
}) } })})
Do you have an idea on this topic ? Is it possible ? Thank you very much !! C