R/myMatch.R

myMatch <- function(p,x,tol=10e-6){

ind <- NA
  
i <- 1
while(i <= length(x)){
  if(abs(p-x[i])<tol){
    ind <- i
    i <- length(x)+1
  }
  else i <- i+1
}

return(ind)

}

Try the fuzzyFDR package in your browser

Any scripts or data that you put into this service are public.

fuzzyFDR documentation built on May 2, 2019, 5:14 a.m.