I'm trying to create an autoplot that will show a plot based on what variable the user selects, but it just shows up as a straight line even though the name on the y axis does change depening on what the user chooses. Here is a basic version of the code:
library(shiny)
library(fpp3)
ui <- fluidPage(
selectInput("select", "Choose variable", choices = names(aus_production)),
plotOutput("plot")
)
server <- function(input,output){
output$plot <- renderPlot({
aus_production %>% autoplot(input$select)
})
}
shinyApp(ui = ui,server = server)