Created
July 15, 2013 14:23
-
-
Save pvictor/6000352 to your computer and use it in GitHub Desktop.
testShiny
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
library(shiny) | |
shinyServer(function(input, output) { | |
sortie<-NULL | |
sortie <- reactive({ | |
if (input$click1>0) {data.frame(rnorm(10), rexp(10))} | |
}) | |
output$click.feeback1 <- renderText({ | |
text <- "Appuyez sur les boutons :"}) | |
output$table <- renderTable({ | |
data.frame(sortie()) | |
}) | |
graph <- reactive({ | |
if (input$click1>0 & input$click2>0){plot(sortie()) | |
} | |
}) | |
output$graphique <- renderPlot({graph() | |
}) | |
}) | |
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
library(shiny) | |
shinyUI(pageWithSidebar( | |
headerPanel("Titre"), | |
sidebarPanel( | |
br(), | |
h5(textOutput("click.feeback1")), | |
actionButton("click1", "Executer"), | |
br(), | |
actionButton("click2", "Tracer") | |
) | |
, | |
mainPanel( | |
#tabsetPanel( | |
h4("Tableau"), | |
tabPanel("Base", tableOutput("table")), | |
h4("Graphique"), | |
plotOutput("graphique") | |
# ) | |
) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment