Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プロットにR^2値を追加したいと思います。次のように、ラベルをgeom_text()に渡しました。
geom_text(aes(x,y,label=caption),parse=T, data.frame(x=-2,y=80,caption=("R^2=0.43"))))
ただし、=(R ^ 2,0.43)としてプロットされます。何か案は?
キャプションを「R^2==0.43」にします。のヘルプページをご覧くださいplotmath。そこにそれは==あなたに等しいことを与えることを示しています。
plotmath
==
編集:
質問の後のコメントに答えるには、式のtopを使用できます。"atop(R^2==0.43,p==0.763)" これは2行で機能しますが、それ以上は機能しません。
"atop(R^2==0.43,p==0.763)"