inst/shiny-examples/area/server.R

library(shiny)
library(pkghw4g3)

shinyServer(function(input, output) {

    simulate <- reactive({
        estimate_area(B = input$B, seed = input$seed)
    })


    output$plot <- renderPlot({
        plot.area(simulate())
    })

 output$area <- renderText({
        paste("The value of the estimated area is:", simulate()$estimated_area)
    })

})
ptds2021/pkghw4g3 documentation built on Dec. 22, 2021, 9:58 a.m.