[R] Percentile function
Art Salwin
salwin at mitretek.org
Tue Oct 17 14:07:43 CEST 2000
Is there an R function that inputs a value and a vector, and
returns the percentile corresponding to the value?
Something like
pvalue<-function(x,vector){mean(x>=vector)}
but with interpolation.
Given the above function, is there a way to do the following
without the loop:
for(i in 1:10) y[i] <- pvalue(x[i],vector)
where x and y are numeric vectors of length 10?
--
Art Salwin
salwin at mitretek.org
(202) 863-2985
(202) 863-2988 (fax)
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list