感情分析のために R で Viral Heat API を使用しようとしています。URL でブラウザを直接叩くと、適切な結果が返されます。 http://www.viralheat.com/api/sentiment/review.json?text=私は幸せです&api_key=
結果: {"prob":0.6652067715019936,"mood":"positive","text":"私は幸せです"}
しかし、R から実行すると、NULL が返されます。
R コード:
vh_answer = getURL("http://www.viralheat.com/api/sentiment/review.json?text=i%20am%20happy&api_key=<my key>")
理由は何ですか?誰でも助けてもらえますか?