Last active
December 20, 2015 10:39
-
-
Save pssguy/6117415 to your computer and use it in GitHub Desktop.
simple dataTabls setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyServer(function(input, output, session) { | |
output$weeklyTable <- renderChart2({ | |
# print(df) confirms data in | |
dt <- dTable( | |
df | |
) | |
dt | |
}) | |
output$testText <- renderText({ | |
"test text" | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shinyUI(pageWithSidebar( | |
headerPanel(""), | |
sidebarPanel( | |
), | |
mainPanel( | |
chartOutput("weeklyTable","highcharts"), | |
textOutput("testText") # confirms connection | |
) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fix Line 10 in ui.R to
chartOutput('weeklyTable', 'datatables')