R/getMAP.R

Defines functions getMAP

Documented in getMAP

#' factorHeteroFounders: a function for multiplying probabilities in case of heterocigote founders.
#'
#' @param topn Format parameter.
#' @param resQ List of CPTs.
#' @import paramlink
#' @import igraph
#' @export
#' @return A MAP from the probability table.

getMAP<-function(resQ,topn=3){
  
 resQtop <- lapply(resQ,function(x){
                        x<-x[order(x[,"prob"],decreasing=TRUE)[1:min(topn,nrow(x))],]
                        return(x)
                    })}

Try the fbnet package in your browser

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

fbnet documentation built on July 9, 2023, 6:24 p.m.