assignTrainingFolds: Assigns each row in the input data a fold number randomly...

View source: R/pipeline_modules.R

assignTrainingFoldsR Documentation

Assigns each row in the input data a fold number randomly while ensuring the same number of cases/controls are assigned to each fold.

Description

Assigns each row in the input data a fold number randomly while ensuring the same number of cases/controls are assigned to each fold.

Usage

assignTrainingFolds(data, classColname, nFolds, pipelineRunInformation)

Arguments

data

A matrix/data.frame with a column named <class.colname> corresponding to a binary indicator of case/control.

classColname

The name of the column corresponding to a binary indicator of case/control.

nFolds

The number of folds to be assigned.

pipelineRunInformation

The object originally created by beginPipelineRun.

Value

A vector with elements corresponding to rows in data. Each element is a number between 1-nFolds and represents which cross-validation fold the row is assigned to.


marioni-group/MethylPipeR documentation built on Oct. 10, 2024, 3:32 p.m.