Last active
August 21, 2016 14:05
-
-
Save krishnaiitd/e8d628d741bde87fd7057642d4b700a8 to your computer and use it in GitHub Desktop.
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
diabetesRisk <- function(glucose) glucose / 200 | |
shinyServer( | |
function(input, output) { | |
output$inputValue <- renderPrint({input$glucose}) | |
output$prediction <- renderPrint({diabetesRisk(input$glucose)}) | |
} | |
) |
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
shinyUI( | |
pageWithSidebar( | |
# Application title | |
headerPanel("Diabetes prediction"), | |
sidebarPanel( | |
numericInput('glucose', 'Glucose mg/dl', 90, min=50, max=200, step = 5), | |
submitButton('Submit') | |
), | |
mainPanel( | |
h3('Results of prediction'), | |
h4('You entered'), | |
verbatimTextOutput('inputValue'), | |
h4('Which resulted in a prediction of '), | |
verbatimTextOutput("prediction") | |
) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment