Skip to content

Instantly share code, notes, and snippets.

@ramnathv
Forked from pssguy/global.R
Last active December 20, 2015 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramnathv/6117524 to your computer and use it in GitHub Desktop.
Save ramnathv/6117524 to your computer and use it in GitHub Desktop.
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","datatables"),
textOutput("testText") # confirms connection
)
))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment