Learn R Programming

qpcR (version 1.3-7.1)

rep2mod: Converts a 'replist' back to a 'modlist'

Description

This function is essentially the reverse of modlist. An object of class 'replist' is converted back to a 'modlist', with the original grouping structure attached.

Usage

rep2mod(rl)

Arguments

rl
a 'replist' containing replicates.

Value

  • A 'modlist' containing all single runs.

encoding

latin1

Details

The returned 'modlist' has an attribute 'group' attached, which is a vector containing the original grouping (number of groups, number of replicates). This can be queried by attr(name, "group").

Examples

Run this code
## create a 'modlist'
ml1 <- modlist(reps, 1, 2:5, l4)

## convert into 'replist'
rl1 <- replist(ml1, group = rep(1, 4))
par(mfrow = c(2, 1))
plot(rl1, main = "A 'replist'")

## convert back to a 'modlist'
ml2 <- rep2mod(rl1) 
plot(ml2, main = "A 'modlist'")

Run the code above in your browser using DataLab