Compare the distribution of samples with two different batches.
Arguments
- pheno
A data.frame of the samples with the characteristics to normalize.
- index1, index2
A list with the index for each sample, the name of the column in
pheno
with the batch subset or the character .
Value
A matrix with the variables and the columns of of each batch.
Negative values indicate index1
was better.
Examples
index1 <- create_subset(50, 24)
index2 <- batch_names(create_subset(50, 24))
metadata <- expand.grid(height = seq(60, 80, 5), weight = seq(100, 300, 50),
sex = c("Male","Female"))
compare_index(metadata, index1, index2)
#> subgroups
#> SubSet1 SubSet2 SubSet3
#> height 0.27800502 0.55676788 0.16930483
#> weight 1.27977491 -18.94390957 3.73226093
#> sex -0.03162073 -0.01803725 -0.02785387