ggplot not generating correctly in shiny – shiny

selectInput(“area”, “Select an area of choice” , choices = c(” Andaman.and.Nicobar.Islands”
,”Arunachal.Pradesh” , “Assam.and.Meghalaya” , “Naga.Mani.Mizo.Tripura”,
“Himalayan.West.Bengal.and.Sikkim” , “Gangetic.West.Bengal” ),
selected = “Andaman.and.Nicobar.Islands”) ,

mainPanel( plotOutput(“timeseries”) )

) # ui
server<-function(input, output){
output$timeseries<- renderPlot({
ggplot(file) + geom_line(aes(x=input$area, y=Time), color= “blue”)
})
}
the dataset has a time coulmn, and then there are columns with region names containing rainfall values to the corresponding time.

Time Andaman and Nicobar Islands Arunachal Pradesh Assam and Meghalaya
1951 3275.1 3354.2 2613.8
1952 3079.9 2396.1 2851.3
1953 2721.9 2559.9
1954 3449 2859.1
1955 3349.6 5063.5 2761.2
1956 3080 4195.5 2802.9

#below is the image of plot

Read more here: Source link