scored_table <- data.frame(
sample1 = c(1, 2, 3),
sample2 = c(4, NA, 6),
sample3 = c(7, 8, 9)
)
rownames(scored_table) <- c("gene1", "gene2", "gene3")
control_table <- data.frame(
control1 = c(1, 1, 1),
control2 = c(2, 2, 2),
control3 = c(3, 3, 3)
)
rownames(control_table) <- c("gene1", "gene2", "gene3")
zscore(scored_table, control_table)
zscore(scored_table, control_table, na.action = "fail")
Run the code above in your browser using DataLab