Skip to contents

Checks if all the values are maximally distributed in the several batches. Aimed for categorical variables.

Usage

distribution(report, column)

Arguments

report

A data.frame which must contain a batch column. Which can be obtained with inspect().

column

The name of the column one wants to inspect.

Value

TRUE if the values are maximal distributed, otherwise FALSE.

Examples

data(survey, package = "MASS")
columns <- c("Sex", "Age", "Smoke")
nas <- c(137, 70) # Omit rows with NA to avoid warnings in design
index <- design(pheno = survey[-nas, columns], size_subset = 70,
                iterations = 10)
batches <- inspect(index, survey[, columns])
distribution(batches, "Sex")
#> [1] TRUE
distribution(batches, "Smoke")
#> [1] TRUE