R/getpval.R

Defines functions getpval

.getpval=function(k,null){

 i=1
 maxn=length(null)
 maxv=null[maxn]

   if(k<=maxv){
     
     while(k>null[i] & i<maxn){
       i=i+i
     }

     if(i>maxn){
       r=maxn
       l=i/2
     } else{
       r=i
       l=i/2
     }

     m=.binsearch(k,l,r,null)
     pval=1-(m/maxn)
   } else{
     pval=1/maxn   
   }
 
return(pval)
}

Try the bc3net package in your browser

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

bc3net documentation built on May 30, 2017, 5:22 a.m.