Description Usage Arguments Value Note Author(s) See Also Examples
Function to join list of similarities by a function provided by the user.
1 | similarities(sim, func, ...)
|
sim |
list of similarities to be joined. All similarities must have the same dimensions. The genes are assumed to be in the same order for all the matrices. |
func |
function to perform on those similarities: |
... |
Other arguments passed to the function |
A matrix of the size of the similarities
It doesn't check that the columns and rows of the matrices are in the same order or are the same.
Llu<c3><ad>s Revilla
weighted
for functions that can be used, and
addSimilarities
for a wrapper to one of them
1 2 3 4 5 6 7 | set.seed(100)
a <- seq2mat(LETTERS[1:5], rnorm(10))
b <- seq2mat(LETTERS[1:5], seq(from = 0.1, to = 1, by = 0.1))
sim <- list(b, a)
similarities(sim, weighted.prod, c(0.5, 0.5))
# Note the differences in the sign of some values
similarities(sim, weighted.sum, c(0.5, 0.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.