repform {qpcR} | R Documentation |
This function formats the PCR data prior to the model analysis. The columns of the PCR data, that need to be in a dataframe or matrix, are defined by a factor vector in respect to cycle data and fluorescence data of (possible) replicates.
repform(x, group)
x |
a dataframe or matrix containing the PCR data. |
group |
a vector defining the data structure in respect to PCR cycles and replicated data |
The function calls the stack
function. The column containing the cycle number must be termed '0'.
A dataframe that is formatted for use in the multdrc
analysis.
Andrej-Nikolai Spiess & Christian Ritz
data(reps) ### take the first five columns of the dataframe, ### first column contains the cycle numbers, ### the next four columns are replicates repData <- repform(reps[,1:5], c(0,1,1,1,1)) m2 <- drmfit(values ~ Cycles, curve = Curve, data = repData, fct = l5()) pcrplot(m2, type = "errbar") ### take the first five columns of the dataframe, ### first column contains the cycle numbers, ### the next four columns are two pairs of replicates repData <- repform(reps[,1:5], c(0,1,1,2,2)) m2 <- drmfit(values ~ Cycles, curve = Curve, data = repData, fct = l5()) pcrplot(m2, type = "all", col = 1:2)