如何解决“中断和标签必须具有相同长度的错误”?

时间:2019-05-10 01:27:22

标签: r ggplot2

每次运行代码时,都会出现断行和标签长度不一样的错误

我尝试多次重写代码,但是似乎没有任何效果。我也是使用Rstudio的新手

denisondata %>% 
  group_by(genderid) %>% 
  mean_ci(race) %>% 
  filter(genderid != "NA") %>% 

  ggplot(., aes(x = genderid, y = mean, fill = genderid)) +
  geom_col() + 
  facet_wrap(~race) +
  labs(x = "Gender Identity", y = "Race") +
  scale_x_continuous(breaks = c(1, 2, 3, 4, 5), 
                     labels = c("White, Hispanic, Black, Asian, Other"), 
                     limits = ("White, Other")) +
  theme(text = element_text(family = "Garamond", size = 12), 
        legend.position = "blank")

我希望会创建有关种族和性别认同的条形图

0 个答案:

没有答案