Description Usage Arguments Value Examples
View source: R/getSimilarity.R
Measures of patient similarity
1 | getSimilarity(x, type = "pearson", customFunc, ...)
|
x |
(matrix) matrix for which pairwise patient similarity is to be computed. Expects one column per patient, and one measurement per row. |
type |
(character) name of similarity measure. Currently supports Pearson correlation ('pearson') or a custom measure ('custom') |
customFunc |
(function) custom similarity function. Only used when
|
... |
parameter for customFunc |
symmetric matrix of size N, where N is number of samples
1 2 3 4 | data(xpr)
x <- getSimilarity(xpr) # similarity by Pearson corr
mySim <- function(x) cor(x,method='kendall')
x <- getSimilarity(xpr,customFunc=mySim) # custom similarity
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.