Learn R Programming

qpcR (version 1.1-8)

repform: Formatting of PCR data with or without replicates for analysis

Description

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.

Usage

repform(x, group)

Arguments

x
a dataframe or matrix containing the PCR data.
group
a vector defining the data structure in respect to PCR cycles and replicated data

Value

  • A dataframe that is formatted for use in the multdrc analysis.

Details

The function calls the stack function. The column containing the cycle number must be termed '0'.

Examples

Run this code
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)

Run the code above in your browser using DataLab