replaceBinswithLR: Replace bins with LRs

Description Usage Arguments Examples

View source: R/NBfunctions.R

Description

This is a helper function for OnocoSigNB. Given the bin info, and bined data, replace each bin with the corresponding Likelihood ratio.

Usage

1
replaceBinswithLR(bin_vector, the_bin_info)

Arguments

bin_vector
the_bin_info

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (bin_vector, the_bin_info) 
{
    new_bin_vector = lapply(1:len(bin_vector), function(x) {
        the_bin = as.character(bin_vector[x])
        bin_value = the_bin_info[the_bin]
        bin_value
    })
    new_bin_vector = unlist(new_bin_vector)
    return(new_bin_vector)
  }

califano-lab/OncoSig documentation built on Oct. 2, 2020, 3:24 p.m.