楼主: qi-ge-ge
6621 3

[问答] 关于ggplot中的aes错误讯息 [推广有奖]

  • 0关注
  • 0粉丝

本科生

10%

还不是VIP/贵宾

-

威望
0
论坛币
280 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1730 点
帖子
27
精华
0
在线时间
79 小时
注册时间
2013-7-14
最后登录
2017-10-4

楼主
qi-ge-ge 发表于 2016-11-29 02:05:46 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
ggplot(data,aes(x=data$Region))+geom_histogram()
一直显示错误讯息,不知道如何修改,其中data$Region的长度是7803

Error: Aesthetics must be either length 1 or the same as the data (7803): x



二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:gplot plot GPL Aesthetics histogram either Error 如何

沙发
johnmy 发表于 2016-11-29 02:58:54
http://stackoverflow.com/questions/26863844/several-graphs-in-ggplot2-aesthetics-must-either-be-length-one-or-the-same-len
http://stackoverflow.com/questions/20057452/aesthetics-must-either-be-length-one-or-the-same-length-as-the-dataproblems

藤椅
cheetahfly 在职认证  发表于 2016-11-29 08:28:06
你先这样试下:
ggplot(data, aes(x = Region)) + geom_histogram()
已有 1 人评分热心指数 收起 理由
飞天玄舞6 + 2 精彩帖子

总评分: 热心指数 + 2   查看全部评分

板凳
smm1988 发表于 2016-11-29 09:40:03
你这个region是属于data的吧  感觉要这样的话也应该是data$region 或者直接x=region 因为你前面已经说明了data

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-30 11:26