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 datay = 5:1)
data

#问题

ggplot(data, aes(x, y)) +
# Draw barchart with ggplot2 packagegeom_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 packagegeom_bar(stat = "identity")

参考:R

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

Error: stat_count() can only have an x or y aesthetic Run `rlang::last_error()` to see where the err相关推荐

  1. stat_count() must not be used with a y aesthetic

    stat_count() must not be used with a y aesthetic 目录 stat_count() must not be used with a y aesthetic ...

  2. ggplot报错 stat_count() can only have an x or y aesthetic

    在使用ggplot画柱状图的时候,发生了报错:tat_count() can only have an x or y aesthetic. #画图用的矩阵 > b3name mean lcl95 ...

  3. 解决:Error: Insufficient values in manual scale. 5 needed but only 4 provided.Run `rlang::last_error()

    解决:Error: Insufficient values in manual scale. 5 needed but only 4 provided.Run `rlang::last_error() ...

  4. 解决:Error: geom_point requires the following missing aesthetics: y Run `rlang::last_error()`

    解决:Error: geom_point requires the following missing aesthetics: y Run `rlang::last_error()` to see w ...

  5. 【WSL2】ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemo

    ➜ build git:(master) ✗ cmake .. -DHTTP_PROXY=http://192.168.50.65:7890 ➜ build git:(master) ✗ make b ...

  6. docker error:在容器内无法运行yum -y update,因为没有root权限

    一.问题描述 进入pxc容器后,本来进行yum更新命令,可是,因为进入不是root用户,所以无法更新yum # docker exec -it 3c15 bash bash-4.2$ yum upda ...

  7. mysql error:2014 Commands out of sync; you can't run this command now

    最近在项目中经常会出现数据库操作失败的,日志抛出的错误的 Commands out of sync; you can't run this command now.但是把具体的这条sql语句放到可视化 ...

  8. 【Rstudio】出现的错误:Error in `vec_as_location()`: `...` must be empty.

    在运行dplyr包安装过程中,有可能会提示这个错误,重新进行一边安装就好 Error in `vec_as_location()`: ! `...` must be empty. x Problema ...

  9. Datacamp_Introduction to the Tidyverse

    1_Data wrangling gapminder:An excerpt of the data available at Gapminder.org. For each of 142 countr ...

最新文章

  1. HighGUI图像用户界面初步(滑动条、鼠标操作)
  2. 题目1105:字符串的反码
  3. 学习PHP 逛的几个网站。
  4. Android 布局中 如何使控件居中
  5. 【转载】SharpDevelop代码分析
  6. 无网络状态下修改计算机ip,电脑突然没有网络的到底是什么原因,查看ip地址...
  7. 人行联网核查更新_又一批新职业公布,学互联网技术,等于站在就业“风口”...
  8. Bootstrap组件_输入框组
  9. 从cpp向qml文件传中文字符串的方法
  10. selenium autoit java_Java+Selenium——AutoIt工具处理文件上传
  11. 【英语学习】【WOTD】accolade 释义/词源/示例
  12. 你需掌握的CSS知识都在这了(长文建议收藏,文末有福利)
  13. 开源项目:RGB转BMP
  14. 算法:回溯十八 Factor Combinations 因子组合(3种解法)
  15. 日语动词变形(概念明确篇)
  16. 转:钉钉群直播提取视频文件-手机版
  17. 用c语言编程心形,用c语言编写心形图案
  18. 混沌工程-为什么推广的如此困难
  19. 【网络工程】浅显易懂TCP/IP协议 三次握手 四次挥手
  20. project 2016软件

热门文章

  1. 【SqlServer系列】子查询
  2. 充气娃娃?Python告诉你到底有多爽......
  3. 青龙面板之九章油条(更新)
  4. python类的使用的生物学应用_python类的使用的生物学应用_Python 类的使用
  5. USB Type-C接口(1)——硬件/Lenovo
  6. Hot Water Pipe
  7. 使用DiskGenius进行硬盘数据迁移
  8. zscore标准化步骤_z-score的标准化究竟怎么弄?
  9. GFC全球影视区块链技术峰会在河南成功举办
  10. Android快捷方式