distribSamples: Distribute samples equally into batches in equal numbers of...

Description Usage Arguments Value

View source: R/distributeSampleFuncs.R

Description

Given the number of cases, number of controls, and number of batches in a planned study design this function distributes samples equally into batches, in equal numbers of cases and controls based off the "split" function.

Usage

1
distribSamples(ncases, nctrls, nbatches)

Arguments

ncases

The number of cases.

nctrls

The number of controls.

nbatches

The number of batches that samples will be distributed into.

Value

Returns a list containing the following elements: a list containing the batch structure of the study (info on which samples are cases/controls and which batch they were placed in), a vector containing the names of all samples, a vector containing the names of case samples, and a vector containing the names of control samples. This output is used directly as input into our simulation functions (batchStructure parameter).


immunogenomics/scpost documentation built on July 28, 2021, 4:03 a.m.