Learn R Programming

experDesign (version 0.4.0)

distribution: Distribution by batch

Description

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

Usage

distribution(report, column)

Value

TRUE if the values are maximal distributed, otherwise FALSE.

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.

Examples

Run this code
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[-nas, columns])
distribution(batches, "Sex")
distribution(batches, "Smoke")

Run the code above in your browser using DataLab