Untitled

Maria Morbidelli

19/12/2024

About this application

This is a shiny interactive application that shows a graph with random points

Usage:

The user has to fill the following in the left panel:

R code

```{r, eval=FALSE}

shinyApp(

ui = fluidPage(
titlePanel("Plot Random Numbers"),
wellPanel(uiOutput("documentation")),
sidebarLayout(
sidebarPanel(
numericInput("numeric", "How Many Random Numbers Should be Plotted?",
value = 1000, min = 1, max = 1000, step = 1),
sliderInput("sliderX", "Pick Minimum and Maximum X Values",
-100, 100, value = c(-50, 50)),
sliderInput("sliderY", "Pick Minimum and Maximum Y Values",
-100, 100, value = c(-50, 50)),
textInput("titleBox", "Enter Title Text:", value = "My Title"),
),
mainPanel(
h3("Graph of Random Points"),
plotOutput("plot1")
)
)
),

server = function(input, output)
{ output$documentation <- renderUI({
includeHTML('my_doc.html')
})
output$plot1 <- renderPlot({

set.seed(2024-12-19)
number_of_points <- input$numeric
minX <- input$sliderX[1]
maxX <- input$sliderX[2]
minY <- input$sliderY[1]
maxY <- input$sliderY[2]
dataX <- runif(number_of_points, minX, maxX)
dataY <- runif(number_of_points, minY, maxY)
xlab <- "X Axis"
ylab <- "Y Axis"
main <- input$titleBox
plot(dataX, dataY, xlab = xlab, ylab = ylab, main = main,
xlim = c(-100, 100), ylim = c(-100, 100))
})
}
```

## 
## Listening on http://127.0.0.1:7336