我收到错误:stat_count() 只能有 x 或 y 美学。尝试使用 Excel 工作表中的数据进行绘图时
library(readxl)
library(dplyr)
library(ggplot2)
dataset= read_excel("D:/Downloads/Covid19.xlsx")
dataset2= read_excel("D:/Downloads/Covid19.xlsx", sheet = "Sheet2")
dataset3= dataset[,c(4,5)]
ggplot(dataset2, aes(x=Region, y= male))+geom_bar()
Run Code Online (Sandbox Code Playgroud)
我来自 excel 文件的数据看起来像这个 数据集
r ×1