Last active
December 10, 2015 07:18
-
-
Save mages/4399886 to your computer and use it in GitHub Desktop.
Test shiny with googleVis
This file contains 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
## Diego de Castillo, Markus Gesmann, February 2013 | |
require(shiny) | |
require(googleVis) | |
shinyServer(function(input, output) { | |
myCities <- reactive({ | |
input$Cities | |
}) | |
output$gvis <- renderGvis({ | |
myData <- head(CityPopularity, myCities()) | |
gvisPieChart(myData) | |
}) | |
}) |
This file contains 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) | |
shinyUI(pageWithSidebar( | |
headerPanel("Example 2: pie chart"), | |
sidebarPanel( | |
numericInput("Cities","Number of cities:", 2) | |
), | |
mainPanel( | |
htmlOutput("gvis") | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment