Skip to contents

Subset some samples that are mostly different.

Usage

extreme_cases(pheno, size, omit = NULL, iterations = 500)

Arguments

pheno

Data.frame with the sample information.

size

The number of samples to subset.

omit

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

iterations

Numeric value of iterations that will be performed.

Value

A vector with the number of the rows that are selected.

See also

Examples

metadata <- expand.grid(height = seq(60, 80, 5), weight = seq(100, 300, 50),
 sex = c("Male","Female"))
sel <- extreme_cases(metadata, 10)
# We can see that it selected both Female and Males and wide range of height
# and weight:
metadata[sel, ]
#>    height weight    sex
#> 1      60    100   Male
#> 4      75    100   Male
#> 5      80    100   Male
#> 13     70    200   Male
#> 14     75    200   Male
#> 21     60    300   Male
#> 25     80    300   Male
#> 29     75    100 Female
#> 47     65    300 Female
#> 48     70    300 Female