当前位置:首页 » 《随便一记》 » 正文

Error: stat_count() can only have an x or y aesthetic Run `rlang::last_error()` to see where the err_data+scenario+science+insight

22 人参与  2022年05月17日 09:44  分类 : 《随便一记》  评论

点击全文阅读


Error: stat_count() can only have an x or y aesthetic Run `rlang::last_error()` to see where the error occurred.
 

目录

Error: stat_count() can only have an x or y aesthetic Run `rlang::last_error()` to see where the error occurred.

#仿真数据

#问题

#解决


#仿真数据

install.packages("ggplot2")             
# Install ggplot2 package
library("ggplot2")                      
# Load ggplot2 package
data <- data.frame(x = LETTERS[1:5],    
# Example data
                   y = 5:1)
data

#问题

ggplot(data, aes(x, y)) +               
# Draw barchart with ggplot2 package
  geom_bar()

> ggplot(data, aes(x, y)) +               
+     # Draw barchart with ggplot2 package
+     geom_bar()
Error: stat_count() can only have an x or y aesthetic.
Run `rlang::last_error()` to see where the error occurred.

#解决

ggplot(data, aes(x, y)) +               
# Draw barchart with ggplot2 package
  geom_bar(stat = "identity")

参考:R 

参考:R ggplot2 Error: stat_count() must not be used with a y aesthetic (Example)
 


点击全文阅读


本文链接:http://zhangshiyu.com/post/40277.html

仿真  参考  解决  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

最新文章

  • 相国独子的丫鬟砸坏我的玉佩后,我当场拒婚阅读_玉佩陈郡谢氏全新_小说后续在线阅读_无删减免费完结_
  • 手术时,我看着病人惨死最新试读_淼淼陆知衍姜颜全本完结_小说后续在线阅读_无删减免费完结_
  • 男友霸道给我开黑卡,转头却骂我是捞女最新章节_肖年顾客黑卡热文_小说后续在线阅读_无删减免费完结_
  • 他在回忆尽头全集_贺南舟许清梨叶絮完结txt_小说后续在线阅读_无删减免费完结_
  • 旅游结婚那天未婚夫另娶女秘书,我让他们一无所有连载_老公迎宾超长版_小说后续在线阅读_无删减免费完结_
  • 完结文异界修仙我的直播间能打赏核弹列表_完结文异界修仙我的直播间能打赏核弹(江流年沈红菱)
  • 全书浏览陪弟弟混骑行圈,离婚你哭什么?(韩星河柳千雪)_陪弟弟混骑行圈,离婚你哭什么?(韩星河柳千雪)全书结局
  • 老公出轨我助攻虐心反转_秦绍卿卿阿溪后续加长_小说后续在线阅读_无删减免费完结_
  • 替老婆坐牢出狱那天,我被送去斗兽场精校文本_许言沈宇郑子番茄热门_小说后续在线阅读_无删减免费完结_
  • 沐巍澜温溪:结局+番外(爱如一刹花火)电子书畅享阅读无广告
  • 傅凌川林柚续集(傅凌川林柚)章节前文+全书阅读(替嫁燃婚:小祖宗嘴硬腰软)最新连载
  • 资助生把导盲犬做成火锅后,我家杀疯了!列表_资助生把导盲犬做成火锅后,我家杀疯了!(陈米雪波波)

    关于我们 | 我要投稿 | 免责申明

    Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1