I'm teaching myself r and i'm trying to create a shiny app on NBA data and i'm asking for the name of player and the statistic for the inputs.
textInput("name", "Name", value = "Giannis Antetokounmpo"),
selectInput("stat", "Stat", choices = list("Points Per Game" = "PTS",
"Rebounds Per Game" = "TRB",
"Assits Per Game" = "AST",
"Steals Per Game" = "STL",
"Blocks Per Game" = "BLK"),
selected = "PTS"),
When trying to create a scatterplot i am getting the error that "Aesthetics must be either length 1 or the same as the data"
NBA_abv %>%
filter(Player == input$name) %>%
ggplot(aes(x = Year, y = input$stat)) + geom_point() + geom_line()