Description Usage Arguments Value Examples
From a continous version of covariates (columns) to 2 discrete classes.
From a discrete version of covariates (columns), following markAs1 the function creates the binary version.
From a matrix or data frame keeps onòy the first occurrence according to a column.
1 2 3 4 5 6 | createBiClasses(coxObj, covs, doChecks = TRUE, labels = c("low",
"high"), minprop = 0.1)
createBinaryMatrix(discrete, markAs1 = c("high", "TRUE"))
keepFirstOccurrence(m, whichCol)
|
coxObj |
cox like object with days and status plus covariates |
covs |
the covariates to use |
doChecks |
if TRUE perform checks on min proportion |
labels |
the labels of the two classes |
minprop |
minimal proportion |
discrete |
discrete version of the covariates (columns) |
markAs1 |
the discrete values associated to 1 |
m |
a matrix |
whichCol |
the column to select the first occurrence |
discrete version of the selected 'covs'.
binary matrix
matrix without duplicates.
1 2 3 4 5 6 7 | dummy <- matrix(c("high","high","low","TRUE","low","low","high","FALSE"), nrow=4)
createBinaryMatrix(dummy)
dummy <- matrix(c("a","b","a","c",1,2,3,4), nrow=4)
colnames(dummy) <- c("gene", "value")
keepFirstOccurrence(dummy,1)
keepFirstOccurrence(dummy,"gene")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.