【发布时间】:2017-12-29 07:48:01
【问题描述】:
首先我想说我是新手。这段代码以前可以运行,但现在它不再运行了。它给了我'错误:找不到对象'选择''我尝试为它提供行名(z$genres),
- z 是我的数据
- genres 包含我要检索的变量列表。
感谢任何帮助。先感谢您!
ui.R
conditionalPanel("sideBarMenu == 'CoordPlot",
selectizeInput("genre", "Genre", choices,
selected = choices[1])
)
服务器.R
observe({
output$barPlot <- renderPlot({
z %>% filter(genres == input$genre) %>% group_by(genres, newname2)%>%summarise(value = mean(values)) %>% ggplot(aes(x = newname2, y=value, fill = newname2)) + geom_bar(stat= "identity", width = 1, show.legend = FALSE) + labs(x = "Genre") + coord_polar()
})
)
【问题讨论】: