Skip to content

Commit

Permalink
Add rpivotTable support
Browse files Browse the repository at this point in the history
  • Loading branch information
dkilfoyle committed Oct 26, 2015
1 parent a716a7b commit 42f9bc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ require(knitr)
require(brew)
#library(rCharts)
library(tabplot) #install_github("tabplot", username="mtennekes", subdir="pkg")
require(rpivotTable) #install_github(c("ramnathv/htmlwidgets", "smartinsightsfromdata/rpivotTable"))

# Define server logic required to summarize and view the selected dataset
shinyServer(function(input, output, session) {
Expand Down Expand Up @@ -193,5 +194,9 @@ shinyServer(function(input, output, session) {
else
tableplot(getSelectedDF())
})

output$pivotTable = renderRpivotTable({
rpivotTable(data=getSelectedDF()) #, onRefresh=htmlwidgets::JS("function(config) { Shiny.onInputChange('myPivotData', config); }"))
})

})
5 changes: 5 additions & 0 deletions ui.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
library(shiny)
library(shinyAce)
require(rpivotTable) #install_github(c("ramnathv/htmlwidgets", "smartinsightsfromdata/rpivotTable"))

source("R/dkdfinfo.r")
source("R/dkgraph.r")
source("R/dkutils.r")
Expand Down Expand Up @@ -98,6 +100,9 @@ shinyUI(pageWithSidebar(
tabPanel("TabPlot",
checkboxInput("limittabplot", label="Show selected variables only"),
plotOutput("mytabplot")
),
tabPanel("PivotTable",
rpivotTableOutput("pivotTable")
)
)
),
Expand Down

0 comments on commit 42f9bc8

Please sign in to comment.