Subset some samples that are mostly different.

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 #> 2 65 100 Male #> 3 70 100 Male #> 9 75 150 Male #> 10 80 150 Male #> 26 60 100 Female #> 28 70 100 Female #> 29 75 100 Female #> 30 80 100 Female #> 34 75 150 Female