Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Hi Kimmo, The code you sent has worked for me. Thank you very much. *Jibrin Adejoh Alhassan (Ph.D)* Department of Physics and Astronomy, University of Nigeria, Nsukka On Mon, Feb 5, 2024 at 7:40 AM Kimmo Elo wrote: > Hi, > > the command line with 'text' should be: > > text(-8,-8, expression(R^2

Re: [R] Help

2024-02-04 Thread Kimmo Elo
Hi, the command line with 'text' should be: text(-8,-8, expression(R^2 * " = 0.62, r = 0.79, N = 161"), cex = 2 ) Best, Kimmo su, 2024-02-04 kello 17:16 +0100, Jibrin Alhassan kirjoitti: > Here is the script I used to plot the graph indicating the text I > wanted to > insert. The line in the

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Many thanks. On Mon, Feb 5, 2024, 1:06 AM Rolf Turner wrote: > > Please see fortunes::fortune(285). > > cheers, > > Rolf Turner > > -- > Honorary Research Fellow > Department of Statistics > University of Auckland > Stats. Dep't. (secretaries) phone: > +64-9-373-7599 ext. 89622 > Home p

Re: [R] Help

2024-02-04 Thread Rolf Turner
Please see fortunes::fortune(285). cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619 __ R-help@r-project.

Re: [R] Help

2024-02-04 Thread Martin Møller Skarbiniks Pedersen
On Sun, 4 Feb 2024 at 17:26, Jibrin Alhassan wrote: > > Here is the script I used to plot the graph indicating the text I wanted to > insert. The line in the script that I have issues with is: text(-8,-8, > "R^2= 0.62", r = 0.79, N = 161", cex = 2 > R^2= 0.62 is not producing R squared = 0.62.

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Here is the script I used to plot the graph indicating the text I wanted to insert. The line in the script that I have issues with is: text(-8,-8, "R^2= 0.62", r = 0.79, N = 161", cex = 2 R^2= 0.62 is not producing R squared = 0.62. Thanks. Sys.setenv( TZ="GMT" ) dt <- read.table("CLMXAPTY_sim",

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
Hi Elo, It gave this error message: CR_plot2.R:14:37: unexpected string constant 13: plot(FDapt,FDcli, pch = 16, cex.lab = 1.6, cex.axis = 1.4, cex.main = 0.8, font.lab = 1.7, font.axis = 1.7, col = "red",main = "Simultaneous Events at CLMX and APTY",ylab="CLMX",xlab="APTY") 14: text(-8,-8, "expr

Re: [R] Help

2024-02-04 Thread Kimmo Elo
Hi, maybe this works: expression(R^2 * "= 0.62") HTH, Kimmo 4. helmik. 2024, 16.11, Jibrin Alhassan mailto:jibrin.alhas...@unn.edu.ng>> kirjoitti: 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 bu

Re: [R] Help

2024-02-04 Thread Jibrin Alhassan
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

Re: [R] Help

2024-02-04 Thread Jinsong Zhao
?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

[R] Help

2024-02-04 Thread Jibrin Alhassan
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 no