sampleEqually: Helper function for makeCvGroup

Description Usage Arguments Value

Description

This function is designed to ensure that creation of cross-validation groups are well-balanced. Suppose there are k groups and n observations. If n is a multiple of k, each group is represented exactly n/k times. Otherwise, each group is represented either floor(n/k) or floor(n/k)+1 times.

Usage

1

Arguments

n

The total number of values to be sampled.

k

The values to be sampled from (1:k).

Value

A vector of length n that contains values in 1:k.


SWS-Methodology/faoswsImputation documentation built on May 9, 2019, 11:48 a.m.