【发布时间】:2021-11-05 05:07:41
【问题描述】:
library(ggplot2)
library(dslabs)
library(dplyr)
data("movielens")
movielens %>% top_n(10) %>% ggplot(aes(title, rating)) +
geom_point()
我希望这段代码能给出一个条形图,就像电影标题和相应评级之间的“movielens”数据框中的 10 部电影的图表,而 这段代码给了我这样的错误:
Error: stat_count() can only have an x or y aesthetic
【问题讨论】:
标签: r dataframe data-science data-visualization