我正在尝试使用下面的代码渲染ggplot图表
selectInput(inputId = "teamA", label = "Pick team A",choices = odiTeam$Team,selected =1)
selectInput(inputId = "teamB", label = "Pick team B",choices = odiTeam$Team,selected =3)
odiTeamAvB<-reactive({
filter(odiTeamAgg,(odiTeamAgg$Team == input$teamA & odiTeamAgg$Opposition == input$teamB) |(odiTeamAgg$Team == input$teamA & odiTeamAgg$Opposition == input$teamB))
})
renderPlot({
ggplot(data=odiTeamAvB(),aes(x=Team,y=Result))+
geom_bar(stat="identity",position=position_dodge())+theme_fivethirtyeight()+
labs(y="Wins")
}, height = 300)
我不断收到错误:ggplot2不知道如何处理类mtsts的数据 尝试了不同的组合,但没有运气。