1. you'll get better feedback if you create a minimal example at:
2. From what you write it sounds like you want to hide some table in the mainPanel? but not so sure after reading the rest ...
output$outputSomething <- renderTable({
if (is.null(input$dataset) || !nzchar(input$dataset)){return(invisible())}
if (ncol(Data()$df)< 2){return(invisible())}
dta <- Data()$df
print(dta)
}
, 'include.rownames' = FALSE
, 'include.colnames' = TRUE
, 'sanitize.text.function' = function(x){x}
)
3. If you are trying to hide something in the sidebarPanel, I think you need to have
uiOutput("outputWhatever") in your ui.R
and something like this in your server.R
output$outputWhatever <- renderUI({
if (is.null(input$dataset) || !nzchar(input$dataset)){return(invisible())}
if (ncol(Data()$df)< 2){return(invisible())}
selectInput(# Replace with what you want to have in sidebarPanel
'inputId' = "inputName"
, 'label' = "select:"
, 'choices' = names(Data()$df)
, 'selected' = Data()$df[1] # pick first column in dataset as names
)
})
If none of these vague hints help, upload on gist.github and describe what you want to hide explicitly based on what we can see on the screen.
best,
Patrick.