To ensure that the batches are comparable some samples are processed in each batch. This function allows to take into account that effect. It uses the most different samples as controls as defined with extreme_cases().

replicates(pheno, size_subset, controls, omit = NULL, iterations = 500)

Arguments

pheno

Data.frame with the sample information.

size_subset

Numeric value of the number of sample per batch.

controls

The numeric value of the amount of technical controls per batch.

omit

Name of the columns of the pheno that will be omitted.

iterations

Numeric value of iterations that will be performed.

Value

A index with some samples duplicated in the batches

See also

Examples

samples <- data.frame(L = letters[1:25], Age = rnorm(25)) index <- replicates(samples, 5, controls = 2, iterations = 10) head(index)
#> $SubSet1 #> [1] 5 6 21 #> #> $SubSet2 #> [1] 5 9 21 23 24 #> #> $SubSet3 #> [1] 1 5 10 21 22 #> #> $SubSet4 #> [1] 2 5 8 20 21 #> #> $SubSet5 #> [1] 5 13 15 16 21 #> #> $SubSet6 #> [1] 5 11 12 17 21 #>