R 错误:ggplot2不';我不知道如何处理MTTS类的数据

R 错误:ggplot2不';我不知道如何处理MTTS类的数据,r,ggplot2,shiny,R,Ggplot2,Shiny,我正在尝试使用下面的代码在shiny中呈现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(od

我正在尝试使用下面的代码在shiny中呈现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)
selectInput(inputId=“teamA”,label=“Pick team A”,choices=odiTeam$team,selected=1)
选择输入(inputId=“teamB”,label=“Pick team B”,choices=odiTeam$team,selected=3)

odiTeamAvB你试过了吗?
ggplot(data=as.data.frame(odiTeamAvB()),…)我现在试过了,现在又犯了一个新错误,这就是我正在做的`ggplot(data=as.data.frame(odiTeamAvB()),aes(x=odiTeamAvB$Team,y=odiTeamAvB$Result))+geom\u bar(stat=“identity”,position=position\u dodge())+theme\u fivethirtyeight()+labs(y=“Wins”),height=300)`现在我找不到对象'odiTeamAvB',或者找不到函数'odiTeamAvB()',或者如果我什么都不使用,我就找不到对象'Team'。使用dput()创建一个可复制的示例,可能还有几行数据会很有帮助。dput(odiTeamAvB)的输出
#结构(函数()
#{
##.dependents$register()
##if(.invalidated | |.running){
#self$.updateValue()
##}
.graphDependsOnId(getCurrentContext()$id,.mostRecentCtxId)
#如果类值相同,请尝试停止(
(attr(.value,“condition”)
##if(.visible)
##.value
##否则不可见(.value)
##如果(.visible)
##可见=,class=“reactive”)