I want to add the value of R ^ 2 to my plot. I passed the geom_text () label as follows:
geom_text(aes(x,y,label=caption),parse=T, data.frame(x=-2,y=80,caption=("R^2=0.43"))))
but it is portrayed as = (R ^ 2.0.43). Any ideas?
You want your title to be "R ^ 2 == 0.43". See the help page for plotmath . There he shows that == gives you equal.
plotmath
==
EDIT:
To answer the comment after the question, you can use atop in the expression. "atop(R^2==0.43,p==0.763)" This works for two lines, but no more.
"atop(R^2==0.43,p==0.763)"
Source: https://habr.com/ru/post/1368857/More articles:My LAMP server spills out ï "¿before anything - phpSQLite Managers for Windows - sqliteSetting FullCalendar configuration values dynamically - javascriptChanging the view of the Zend Framework module script path - moduleLinking to a shared library in Qt - c ++Correct way to use custom library in Qt? - qtDisplay a control panel with each square as an object - C ++ QT - c ++Why am I getting an ASCII coding error with Unicode data in Python 2.4, but not 2.7? - pythonHow to get the ephemeral client port number in ASP.NET? - .netWhat causes this error when using a web service? - web-servicesAll Articles