Skip to content

Instantly share code, notes, and snippets.

@pssguy
Last active December 20, 2015 10:39
Show Gist options
  • Select an option

  • Save pssguy/6117415 to your computer and use it in GitHub Desktop.

Select an option

Save pssguy/6117415 to your computer and use it in GitHub Desktop.
simple dataTabls setup
require(shiny)
require(rCharts)
names<- letters
numbers <- 1:26
dates <- rep(as.Date(c("2010-01-01","2011-07-23","2011-01-03")),8)
dates <- c(dates,as.Date(c("1999-12-25", "2005-07-13")))
df <- data.frame(names=names,numbers=numbers,dates=dates)
shinyServer(function(input, output, session) {
output$weeklyTable <- renderChart2({
# print(df) confirms data in
dt <- dTable(
df
)
dt
})
output$testText <- renderText({
"test text"
})
})
shinyUI(pageWithSidebar(
headerPanel(""),
sidebarPanel(
),
mainPanel(
chartOutput("weeklyTable","highcharts"),
textOutput("testText") # confirms connection
)
))
@ramnathv
Copy link
Copy Markdown

Fix Line 10 in ui.R to chartOutput('weeklyTable', 'datatables')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment