Changes not reflected in the output while creating a shiny web app in R

shiny
r
rstudio

#1

Hello,

While learning to create a shiny web app using R, I created an input slider and a histogram on a basic app template using this code.

library(shiny)
ui=fluidPage(sliderInput(inputId=“num”,label=“Choose a number”,value=25,min=10,max=70),plotOutput(outputId=“hist”))
server=function(input,output)
{
output$hist=renderPlot({hist(rnorm(100))})
}
shinyApp(ui=ui,server=server)

and I get the output as

but even after closing the output window and removing the code from inside the sliderInput function I get the same output`

ui=fluidPage(sliderInput(plotOutput(outputId=“hist”)))
server=function(input,output)
{
output$hist=renderPlot({hist(rnorm(100))})
}
shinyApp(ui=ui,server=server)

Why is this happening? Shouldn’t the slider be gone when I run this code? Why isn’t it throwing any error?

Thanks


#2

is your app still running?