[R] Easy way?
Jan.Schelling at hydro.com
Mon Jun 26 09:21:17 CEST 2000
n <- 1000
x <- sort(rnorm(n))
x0 <- 1.5
dx <- abs(x-x0)
From: cyg at sympatico.ca on 2000-06-25 23:47 GMT
To: r-help at stat.math.ethz.ch
cc: (bcc: Jan Schelling/HRE/Hydro)
Subject: [R] Easy way?
Say I have this vector x <- sort(rnorm(n)). I'd like to know if there is a nice
way to find out the index of the nearest x to say 1.5?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the R-help