Description Usage Arguments Examples
This is a helper function for OncoSigNB. After training on a training set, this function computes LRs on a new testing set. Note that labels must be provided for the testing set as well.
1 | computeLRsgivenBins(df_1, the_bins, the_bins_info)
|
df_1 |
|
the_bins |
|
the_bins_info |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ##---- 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 (df_1, the_bins, the_bins_info)
{
the_min = -1e+45
the_max = 1e+43
df_1[is.na(df_1)] <- -1e+23
df_1_copy = df_1
for (i in 3:ncol(df_1)) {
df_1_copy[, i] = .bincode(df_1_copy[, i], c(the_min,
the_bins[i - 2][[1]], the_max), right = FALSE)
}
for (i in 3:ncol(df_1)) {
df_1_copy[, i] = replaceBinswithLR(df_1_copy[, i], the_bins_info[i -
2][[1]])
}
return(df_1_copy)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.