[R] Intersection for two curves

Muhammad Rahiz muhammad.rahiz at ouce.ox.ac.uk
Fri Apr 23 19:06:57 CEST 2010


Does anyone know of a method that I can get the intersection where the red and blue curves meet i.e. the value on the x-axis?

x <- 1:10
y <- 10:1
plot(x,y)
abline(lm(y~x),col="blue")
abline(h=2.5,col="red")

Muhammad



More information about the R-help mailing list