library(shiny)
ui <- fluidPage(
selectInput("var", "Variable",
choices = names(diamonds)),
tableOutput("output")
)
server <- function(input, output, session) {
data <- reactive(
filter(diamonds, .data[[input$var]] > 0)
)
output$output <- renderTable(head(data()))
}
library(shiny)
ui <- fluidPage(
selectInput("var", "Variable",
choices = names(diamonds)),
tableOutput("output")
)
server <- function(input, output, session) {
data <- reactive(
filter(diamonds, .data[[input$var]] > 0)
)
output$output <- renderTable(head(data()))
}
library(shiny)
ui <- fluidPage(
selectInput("var", "Variable",
choices = names(diamonds)),
tableOutput("output")
)
server <- function(input, output, session) {
data <- reactive(
filter(diamonds, .data[[input$var]] > 0)
)
output$output <- renderTable(head(data()))
}