shiny_pitch

Dox7
July 27, 2017

Shiny Demo

Description: Scatterplot with Square Root Function and Text

Link: https://dox7.shinyapps.io/shiny_demo/.

App Features

Includes the following input widgets:

  • Slider
  • Text

Applies the function:

  • Square root of the input slider

Produces the output:

  • Scatterplot of the function
  • Text provided by the input panel

Server.R Code Snippet:

function(input, output) {

  output$scatterPlot <- renderPlot({
    x <- runif(sqrt(input$obs))
    y <- runif(sqrt(input$obs))
    plot(x, y)
  })

  output$text <- renderText({
  paste("Username:", input$text)
})
}
function(input, output) {

  output$scatterPlot <- renderPlot({
    x <- runif(sqrt(input$obs))
    y <- runif(sqrt(input$obs))
    plot(x, y)
  })

  output$text <- renderText({
  paste("Username:", input$text)
})
}

Summary:

Given an input using the provided slider and text box, the app generates a scatterplot consisting of a number of plots equal to the square root of the number of selected observations.

Thank you!