Thank you Zhao for the code. When I replotted the graph after inserting the code in my script, it gave me this error message without plotting the graph: Warning message: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) : extra argument ‘col’ will be disregarded. My regards. *Jibrin Adejoh Alhassan (Ph.D)* Department of Physics and Astronomy, University of Nigeria, Nsukka
On Sun, Feb 4, 2024 at 3:21 PM Jinsong Zhao <jsz...@yeah.net> wrote: > ?plotmath > > expression(R^2==0.62) > > On 2024/2/4 18:10, Jibrin Alhassan wrote: > > I have done a scatter plot in R. I want to insert the coefficient of > > determination R^2 = 0.62 as a text in the plot. I have tried to write R^2 > > but could not produce R2. I would appreciate it if someone could help me > > with the syntax. I have tried: expression(paste("", R^2,"=", 0.62)), but > > it did not produce R squared, rather it gave me error messages. Thanks. > > Jibrin Alhassan > > *Jibrin Adejoh Alhassan (Ph.D)* > > Department of Physics and Astronomy, > > University of Nigeria, Nsukka > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.