dot-stratified: Build a representative CV training set

.stratifiedR Documentation

Build a representative CV training set

Description

All credit for this function goes to user mrdwab on GitHub : https://gist.github.com/mrdwab/6424112

Usage

.stratified(df, group, size, select = NULL, replace = FALSE, bothSets = FALSE)

Arguments

df

The input data.frame

group

A character vector of the column or columns that make up the "strata".

size

The desired sample size or proportion in the training set

select

Allows you to subset the groups in the sampling process

replace

For sampling with replacement.

bothSets

Wether or not to return both the training and validation sets


LBMC/wormAge documentation built on April 6, 2023, 3:52 a.m.