pairwiseMatrixOfEnrichments = function(key,value){
#get unique keys
unique_keys <- unique(key)
unique_values <- unique(value)
#create list of key value
#df <- data.frame(keys=key,values=value,stringsAsFactors=F)
#listify
dfList <- lapply(unique_keys,
utilityFunctions::listify,
value,
key)
names(dfList) <- unique_keys
res <- list()
library(dplyr)
res$pval <- utilityFunctions::fisherWrapperPval %>%
utilityFunctions::outerSapplyParallel(dfList,
dfList,
unique_values)
res$or <- utilityFunctions::fisherWrapperOR %>%
utilityFunctions::outerSapplyParallel(dfList,
dfList,
unique_values)
diag(res$or) <- 0
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.