geomean {GeneScoreR} | R Documentation |
Calculate Geometric Means from Count Tables
Description
This function computes the geometric mean for each sample in the given count table.
Usage
geomean(count_table)
Arguments
count_table |
A data frame of gene count data (genes as rows, samples as columns). All columns must be numeric. |
Value
A data frame with the geometric means per sample and the sample IDs.
Examples
# Example data to be scored
count_table <- data.frame(
sample1 = c(1, 10, 100),
sample2 = c(2, 20, 200),
sample3 = c(3, 30, 300)
)
rownames(count_table) <- c("gene1", "gene2", "gene3")
# Calculate Geometric Mean per sample in the count_table
geomean(count_table)
[Package GeneScoreR version 0.1.1 Index]