Description Usage Arguments Value Author(s) Examples
Run a custom distance function on an input data matrix
1  | CustomDistance(my.mat, my.function, ...)
 | 
my.mat | 
 A matrix to calculate distance on  | 
my.function | 
 A function to calculate distance  | 
... | 
 Extra parameters to my.function  | 
A distance matrix
Jean Fan
1 2 3 4 5  | # Define custom distance matrix
manhattan.distance <- function(x, y) return(sum(abs(x-y)))
input.data <- GetAssayData(pbmc_small, assay.type = "RNA", slot = "scale.data")
cell.manhattan.dist <- CustomDistance(input.data, manhattan.distance)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.