The function groups the samples per subcontinental population and generates a matrix containing the sample identifiers and where each column is a subcontinental population.
splitSelectByPop(dataRef)
a matrix
containing the sample identifiers and where
each column is the name of a subcontinental population. The number of
row corresponds to the number of samples for each subcontinental population.
## A data.frame containing samples from 2 subcontinental populations
demo <- data.frame(sample.id=c("SampleA", "SampleB", "SampleC", "SampleD"),
pop.group=c("TSI", "TSI", "YRI", "YRI"),
superPop=c("EUR", "EUR", "AFR", "AFR"))
## Generate a matrix populated with the sample identifiers and where
## each row is a subcontinental population
splitSelectByPop(dataRef=demo)
#> TSI YRI
#> [1,] "SampleA" "SampleC"
#> [2,] "SampleB" "SampleD"