Description Usage Arguments Value Examples
Reorders the label matrix based on the labels of the kernel matrices.
In case there are no labels, the original label matrix is returned,
but with the labels in rows
and cols
as rownames and
column names respectively.
1 | match_labels(y, rows, cols = NULL)
|
y |
a matrix representing the label matrix. |
rows |
a character vector with the labels for the rows or a matrix with rownames that will be used as labels. |
cols |
a character vector with the labels for the cols or a matrix
with colnames that will be used as labels. If |
a matrix with the rows and columns reordered.
1 2 3 4 5 6 7 8 9 10 | mat <- matrix(1:6, ncol = 2,
dimnames = list(c("b", "a", "d"),
c("ca", "cb"))
)
match_labels(mat, c("a","b", "d"), c("ca","cb"))
#Using matrices
data(drugtarget)
out <- match_labels(drugTargetInteraction, targetSim, drugSim)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.