R/sellrs2.R

Defines functions sellrs2

Documented in sellrs2

# Linear ranking selection 2
sellrs2 = function(fitvals, ns, ...){
  n=length(fitvals)
  if(missing(ns)) ns=n
  fitranks = rank(fitvals, ties.method="min")
  p = 2*fitranks/(n*(n+1)) 
  matpool=sample(1:n, size=ns, prob=p, replace=TRUE)
  return(matpool)
}

Try the adana package in your browser

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

adana documentation built on March 18, 2022, 6:03 p.m.