R/optselection.R

"optselection" <- function(cost,d=0,G=NULL,cross)
  {
    if(cross=="bc")
      optselection.bc(cost,d,G)
    else if(cross=="f2")
      optselection.f2(cost,d,G)
    else
      stop("Unknown cross ", cross, ".")
  }

"optselection.bc" <-
function(cost,d=0,G=NULL)
  {
    optimize(f=info2cost.bc,interval=c(0.0001,0.9999),maximum=TRUE,
             G=G,d=d,cost=cost)$maximum
  }

"optselection.f2" <-
function(cost,d=0,G=NULL)
  {
    optimize(f=info2cost.f2,interval=c(0.0001,0.9999),maximum=TRUE,
             G=G,d=d,cost=cost)$maximum
  }

Try the qtlDesign package in your browser

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

qtlDesign documentation built on March 21, 2024, 3:01 a.m.