Description Usage Arguments Value Examples
View source: R/feature_selection.R
Find the Number of Times Each Gene Has Been Expressed
1 | gene_counts(expr, transpose = FALSE)
|
expr |
A matrix of gene expressions with cells as rows and genes as columns |
transpose |
A logical value indicating whether the matrix should be transposed before operations are carried out |
A vector of counts of expression for each gene
1 2 3 4 5 6 7 8 9 10 11 12 | # Creating Data
gene1 <- c(0, 0, 0, 0, 1, 2, 3)
gene2 <- c(5, 5, 3, 2, 0, 0, 0)
gene3 <- c(2, 0, 2, 1, 3, 0, 1)
gene4 <- c(3, 3, 3, 3, 3, 3, 3)
gene5 <- c(0, 0, 0, 0, 5, 0, 0)
genes <- matrix(c(gene1, gene2, gene3, gene4, gene5), ncol = 5)
rownames(genes) <- paste0("cell", 1:7)
colnames(genes) <- paste0("gene", 1:5)
#Calculating Gene Counts
gene_counts(genes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.