I am new to R
我是R的新手
I would like plot using ggplot2
's geom_bar()
:
我想用ggplot2的geom_bar()进行绘图:
top_r_cuisine <- r_cuisine %>%
group_by(Rcuisine) %>%
summarise(count = n()) %>%
arrange(desc(count)) %>%
top_n(10)
But when I try to plot this result by:
但是,当我尝试通过以下方式绘制此结果:
ggplot(top_r_cuisine, aes(x = Rcuisine)) +
geom_bar()
I get this: which doesn't represent the values in top_r_cuisine
. Why?
我明白了:这不代表top_r_cuisine中的值。为什么?
EDIT: I have tried:
编辑:我试过: