make_Ct_ready | R Documentation |
This function collapses technical replicates (if present in data) by means and (optionally) imputes missing data by means calculated separately for each group. This function also prepares Ct data for further steps of analysis.
make_Ct_ready(
data,
imput.by.mean.within.groups,
save.to.txt = FALSE,
name.txt = "Ct_ready"
)
data |
Data object returned from read_Ct_long(), read_Ct_wide() or filter_Ct() function, or data frame containing column named "Sample" with sample names, column named "Gene" with gene names, column named "Ct" with raw Ct values (must be numeric), column named "Group" with group names. Presence of any other columns is allowed, but they will not be used by this function. |
imput.by.mean.within.groups |
Logical: if TRUE, missing values will be imputed by means calculated separately for each group. This parameter can influence results, thus to draw more user attention on this parameter, no default value was set. |
save.to.txt |
Logical: if TRUE, returned data will be saved to .txt file. Default to FALSE. |
name.txt |
Character: name of saved .txt file, without ".txt" name of extension. Default to "Ct_ready". |
Data frame with prepared data. Information about number and percentage of missing values is also printed.
library(tidyverse)
data(data.Ct)
data.CtF <- filter_Ct(data.Ct,
remove.Gene = c("FGF23","ANGPT2","IL1A","CSF2","IL6"),
remove.Sample = c("Control08","Control16","Control22"))
data.CtF.ready <- make_Ct_ready(data.CtF, imput.by.mean.within.groups = TRUE)
head(data.CtF.ready)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.