0
下のコードは機能していますが、光沢があります。美学は、長さ1またはデータ(10)と同じでなければなりません。x、記入r光沢
コード:
ggplot(df_score) +
geom_bar(aes(x=emotion, y=..count.., fill=hashTag),position = "dodge")
データ:
score hashTag
1 Neutral hash1
2 Neutral hash1
3 Positive hash1
4 Neutral hash1
5 Neutral hash1
6 Negative hash2
エラー:
Aesthetics must be either length 1 or the same as the data (10): x, fill
おかげで...あなたのコード内で '印刷' を追加しました
私はここで何かが欠けていない限り、あなたのサンプルデータフレームで 'emotion'と呼ばれる全く変化がないので、あなたのコードは' AES(X = score..'、あるべき。また、。 'ggplot2'コードが正常に動作していて、コードの' shiny'部分に問題がある場合は、それをあなたの質問に含めるべきです。 – Sumedh
ありがとう。私は非常に間違ったことをしました。 – anindya