Dear Ohlbe

» » [...] which led regulators to conclude they were the only ones who could be trusted to make proper use of such pernicious creations.
»
» Maybe their coding skills are not any better than mine*, and they consider that they will always trust whatever they do with a spreadsheet more than anything they might obtain with R ?

» * […] I spent a few more hours trying to have the colour of the plot change based on simple conditions (red if under a threshold value, green above it). I was even waking up at night with ideas on new ways to test. I never succeeded.

I believe it. R is a nasty beast like SAS (© Detlew). Waking up in the middle of the night or – worse – not being able to fall asleep at all is a common side-effect. Since you will never use R again, skip this code:

op  <- par(no.readonly = TRUE)    # Safe original graphics parameters par(pty = "s")                    # I want a square plotting region x   <- runif(n=50, min=1, max=20) # Sample from the uniform distribution a   <- 0.5                        # Intercept b   <- 2                          # Slope y   <- a + b * x + rnorm(n=length(x), mean=0, sd=2) # Response + random error th  <- 10                         # Threshold plot(x, y, type = "n", las = 1)   # Important: type="n", will add points later grid()                            # Nice to have one abline(h = th, col = "red")       # Line for threshold abline(lm(y ~ x), lwd = 2, col = "blue")    # Linear regression points(x[y < th], y[y < th], pch = 21, cex = 1.5,        col = "red", bg = "#FFD700AA")       # Below threshold points(x[y >= th],  y[y >= th], pch = 21, cex = 1.5,        col = "darkgreen", bg = "#32CD32AA") # At least threshold par(op)                           # Restore original graphics parameters

Which gives:

Semitransparent colors in Excel? I don’t think that’s possible.

Dif-tor heh smusma 🖖
Helmut Schütz

The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes