Skip to content

Instantly share code, notes, and snippets.

@accaldwell
Created December 1, 2012 03:53
Show Gist options
  • Save accaldwell/4180472 to your computer and use it in GitHub Desktop.
Save accaldwell/4180472 to your computer and use it in GitHub Desktop.
library(shiny)
library(data.table)
#uncomment for workaround
#assignInNamespace("cedta.override","shiny","data.table")
DT <- data.table(names=c("a","b","c","d","e"),value=c(1,3,5,7,10))
shinyServer(function(input, output) {
output$view <- reactiveTable(function() {
WorkingData <- DT[value>=input$min]
})
})
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("data.table example"),
sidebarPanel(
sliderInput("min",
"Only show values >=",
min = 0,
max = 10,
value = 0,
step = 1)
),
mainPanel(
tableOutput("view")
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment