## create 3 'pcrbatch'es
## and concatenate
dat1 <- pcrbatch(reps, fluo = 2:5, model = l4, plot = FALSE)
dat2 <- pcrbatch(reps, fluo = 6:9, model = l4, plot = FALSE)
dat3 <- pcrbatch(reps, fluo = 10:13, model = l4, plot = FALSE)
batchstat(dat1, dat2, dat3)
## one 'pcrbatch' and doing
## mean on replicates
## defined by 'group'
dat4 <- pcrbatch(reps, fluo = 2:9, model = l4, plot = FALSE)
GROUP <- c(1, 1, 1, 1, 2, 2, 2, 2)
batchstat(dat4, do = "stat", group = GROUP, statfun = mean)
## get the standard deviation
batchstat(dat4, do = "stat", group = GROUP, statfun = sd)
## do stats on many 'pcrbatch'es
## All batches must have same length!
batchstat(dat1, dat2, dat3, do = "stat",
group = c(1, 1, 2, 2))
Run the code above in your browser using DataLab