R/top_thresh.R

Defines functions top_thresh

Documented in top_thresh

top_thresh <-
function(vect, thresh){
    sorted_vect <- sort(vect,decreasing=TRUE)
    v=sorted_vect[thresh]
    ifelse(vect>=v,vect,v)
  }

Try the WLogit package in your browser

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

WLogit documentation built on July 26, 2023, 5:46 p.m.