Hi, all
The shiny app doesn't show any plot.
the error message is : subscript out of bounds
And my code below.
cen <- names(CE_2030)[-1]
shinyApp(
ui = fluidPage(
selectInput(inputId = "section", label = "Section:",
choices = cen),
mainPanel(
plotOutput("Plot"))
),
server = function(input, output) {
output$Plot <- renderPlotly({
y0 <- input$section
dt <- CE_2030[,c("Year",y0)]
pp <- dt %>% ggplot2:: ggplot(aes(x=Year,y= y0))+
geom_area() #+
# geom_abline(aes(yintercept = target$y0))
ggplotly(pp)
})
}
)
shinyApp(ui = ui, server = server)
Thank you!
...