View source: R/enrichment-functions.R
contingencyTable | R Documentation |
contingencyTable
creates a list of 2x2 contingency tables for Fisher's exact test.
contingencyTable(x, cols, signatures, features = "rownames")
x |
A SummarizedExperiment with rowData or a data frame. |
cols |
A character vector containing the names of the columns (must be logical) with the target (TRUE) and reference sets (FALSE). |
signatures |
A named list with signature sets. |
features |
A character vector of length 1. In case that |
A list of 2x2 contingenc tables (xtabs class).
contingencyTable
;
enrichmentTestFisher
;
ora
Other enrichment functions:
enrichmentTestFisher()
,
ora()
library(misctoolsr) se <- exampleSE() sigs <- exampleSignatures() contabs <- contingencyTable(x = se, cols = c("up", "down"), signatures = sigs) contabs df <- as.data.frame(SummarizedExperiment::rowData(se)) contabs2 <- contingencyTable(x = df, features = "taxa", cols = c("up", "down"), signatures = sigs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.