count_table <- data.frame(
sample1 = c(1, 10, 100),
sample2 = c(2, 20, 200),
sample3 = c(3, 30, NA)
)
rownames(count_table) <- c("gene1", "gene2", "gene3")
geomean(count_table)
geomean(count_table, na.action = "fail")
Run the code above in your browser using DataLab