| meanTech | R Documentation |
Computes the arithmetic mean of technical replicates for each sample or group. This is often performed before ANOVA or other statistical analyses to simplify comparisons between experimental groups.
meanTech(
x,
groups,
numOfFactors,
numberOfrefGenes,
block,
set_missing_target_Ct_to_40 = FALSE
)
x |
A raw data frame containing technical replicates. |
groups |
An integer vector or character vector specifying the column(s) to group by before calculating the mean of technical replicates. |
numOfFactors |
Integer. Number of experimental factor columns |
numberOfrefGenes |
Integer. Number of reference genes. |
block |
Character. Block column name or |
set_missing_target_Ct_to_40 |
If |
The meanTech function calculates the mean of technical replicates
based on one or more grouping columns. This reduces the dataset to a single
representative value per group, facilitating downstream analysis such as
fold change calculation or ANOVA.
A data frame with the mean of technical replicates for each group.
Ghader Mirzaghaderi
# Example input data frame with technical replicates
data1 <- read.csv(system.file("extdata", "data_withTechRep.csv", package = "rtpcr"))
# Calculate mean of technical replicates using first four columns as groups
meanTech(data1,
groups = 1:2,
numOfFactors = 1,
numberOfrefGenes = 1,
block = NULL)
# Another example using different dataset and grouping columns
data2 <- read.csv(system.file("extdata", "data_Lee_etal2020qPCR.csv", package = "rtpcr"))
meanTech(data2, groups = 1:3,
numOfFactors = 2,
numberOfrefGenes = 1,
block = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.