splitSample: Split by Random Sampling

Description Usage Arguments Value

View source: R/4-split.R

Description

splitSample builds a training and validation set by randomly sampling the subjects found within the ExprsArray object. Note that this method is not truly random. Instead, splitSample iterates through the random sampling process until it settles on a solution such that both the training and validation set contain at least one subject for each class label. If this method finds no solution after 10 iterations, the function will post an error. Set percent.include = 100 to skip random sampling and return a NULL validation set. Additional arguments (e.g., replace = TRUE) passed along to sample.

Usage

1
splitSample(object, percent.include = 67, ...)

Arguments

object

An ExprsArray object to split.

percent.include

Specifies the percent of the total number of subjects to include in the training set.

...

For splitSample: additional arguments passed along to sample. For splitStratify: additional arguments passed along to cut.

Value

Returns a list of two ExprsArray objects.


tpq/exprso documentation built on July 27, 2019, 8:44 a.m.