Having issues with my data table to show up on my shiny app. Im using certain widgets in order to select key columns to display. I want to be able to select certain column values that will eventually display on my table. But as of now no table is showing up, just the widgets. What am I doing wrong?
ui <- fluidPage(
titlePanel("Brittany's Clothes Inventory"),
sidebarLayout(
sidebarPanel(
sliderInput(inputId = "Value", "1. Enter Price Range", min = 0, max = 50, value = 0.5, step = 0.01),
uiOutput("picker"),
actionButton("view", "View selection"),
textOutput("DateRange")),
mainPanel(ui <-
tableOutput("table"),
textOutput("mytext")
)),
textInput(inputId = "text",
label = "4. Enter Notes Here", ""),
DT::dataTableOutput("table")
)
server<- function(input, output, session) {
output$table <- DT::renderDataTable(DT::datatable({
observeEvent(input$reset, {
updateSliderInput(inputId = "Price Range", value = 0)})
df1
})
data <- reactive({
df1
})
output$picker <- renderUI({
pickerInput(inputId = 'pick',
label = '3. Choose variables',
choices = colnames(data()),
options = list(`actions-box` = TRUE), multiple = TRUE)
})
datasetInput <- eventReactive(input$view,{
datasetInput <- data() %>%
select(input$pick)
return(datasetInput)
})
# table <- reactive({(df1)})
output$mytext <- renderText(input$text)
output$table <- renderTable({table()})
}