Shiny plot not showing

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]

ui = fluidPage(
selectInput(inputId = "section", label = "Section:",
choices = cen),

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))

shinyApp(ui = ui, server = server)

Thank you!


Very likely this error y is related to the dimensions of your data, you are trying to reference an un-existing position.

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.