I'm using a selectInput call to reactively load multiple tables and I'm finding it seems redundant to have the selectInput columns to show up in each table. How do I go about removing/hiding the columns? I've tried using filter(-x), but that causes errors.
How would I go about removing the Species column from the table in the below code?
library(shiny)
library(dplyr)
data(iris)
ui <- fluidPage(
titlePanel("Data by Species"),
fluidRow(
selectInput("Species", "Choose species", unique(iris$Species)),
tableOutput("table")
)
)
server <- function(input, output) {
datasetInput1 <- reactive({
iris %>% filter(Species == input$Species)
})
output$table <- renderTable({
dataset <- datasetInput1()
})
}
shinyApp(ui = ui, server = server)
I get the following output via app:
How do I remove the Species column in the app output?